//
// Extraction
//

#include "stagesetup.h"

// Characters
#define CHR_DRCAROLL      0x00
#define CHR_RLSHOCK       0x0e
#define CHR_TECH1         0x0f
#define CHR_TECH2         0x10
#define CHR_TOPGUARD1     0x11
#define CHR_TOPGUARD2     0x12
#define CHR_TOPGUARD3     0x13
#define CHR_TOPGUARD4     0x14
#define CHR_TOPGUARD5     0x15
#define CHR_CASS          0x1c
#define CHR_MRBLONDE      0x1d
#define CHR_INTRO_GUARD   0x1e
#define CHR_OUTRO_GUARD1  0x1f
#define CHR_OUTRO_GUARD2  0x20
#define CHR_SPECIAL_SHOCK 0x22 // guy who appears if foyer completed perfectly

// Objects
#define OBJ_TOPROOMDOOR    0x05
#define OBJ_LIGHTSWITCH    0x0a
#define OBJ_HOVERCOPTER    0x0b
#define OBJ_NIGHTVISION    0x0e
#define OBJ_JUMPSHIP       0x10
#define OBJ_ROCKETAMMO1    0x14
#define OBJ_ROCKETAMMO2    0x15
#define OBJ_GRENADE        0x1a
#define OBJ_DRAGON         0x1b
#define OBJ_DY357          0x1c
#define OBJ_ROCKETLAUNCHER 0x1f

// Stage flags
#define STAGEFLAG_ELEVATOR_PC_DESTROYED     0x00000001
#define STAGEFLAG_TRIGGER_CANTLEAVEANY_MSG  0x00000002
#define STAGEFLAG_TOP_BODYGUARDS_DEAD       0x00000004
#define STAGEFLAG_ACCESSED_FOYER_ELEVATOR   0x00000100
#define STAGEFLAG_ELEVATOR_UNLOCKED         0x00000200
#define STAGEFLAG_HOVERCOPTER_DESTROYED     0x00000400
#define STAGEFLAG_OBJECTIVE_BODYGUARDS_DEAD 0x00000800
#define STAGEFLAG_REACHED_HELIPAD           0x00001000
#define STAGEFLAG_FOYER_LIGHTS_RESTORED     0x00002000
#define STAGEFLAG_DRCAROLL_DEAD             0x00004000
#define STAGEFLAG_DRCAROLL_ATTACKED         0x00008000
#define STAGEFLAG_DRCAROLL_DAMAGED          0x00010000
#define STAGEFLAG_TECHS_RUNNING             0x00020000
#define STAGEFLAG_CHOPPER_GO_TO_ROOF        0x00040000
#define STAGEFLAG_ENTERING_TOP_ROOM         0x00080000
#define STAGEFLAG_TOP_GUARDS_ATTACKING      0x00200000
#define STAGEFLAG_TOP_LIGHTS_OFF            0x00400000
#define STAGEFLAG_00800000                  0x00800000 // unset in intro, not used elsewhere
#define STAGEFLAG_HOVERCOPTER_ON_ROOF       0x01000000
#define STAGEFLAG_CASS_SHIELD_DAMAGED       0x02000000
#define STAGEFLAG_FOYER_LIGHTS_OFF          0x04000000
#define STAGEFLAG_SAID_SURRENDER_OR_DIE     0x10000000
#define STAGEFLAG_SAID_GIVE_UP              0x20000000
#define STAGEFLAG_SAID_FINAL_WARNING        0x40000000
#define STAGEFLAG_TECHS_FINISHED            0x80000000

// AI Lists
#define AILIST_DRCAROLL_FOLLOWING 0x0401
#define AILIST_INIT_DRCAROLL      0x0404
#define AILIST_GENERAL_COMBAT     0x0406
#define AILIST_CASS_OUTRO         0x0407
#define AILIST_HOVERCOPTER        0x0408
#define AILIST_INIT_TECH1         0x040b
#define AILIST_INIT_TECH2         0x040c
#define AILIST_CASS               0x040d
#define AILIST_TOP_GUARD          0x040f
#define AILIST_INIT_TOP_GUARD     0x0410
#define AILIST_TOP_GUARD_BLINDED  0x0411
#define AILIST_OUTRO              0x0412
#define AILIST_DEFEND_PAD         0x0413
#define AILIST_INIT_SHOCK         0x0414

extern s32 intro[];
extern u32 props[];
extern struct path paths[];
extern struct ailist ailists[];

struct stagesetup setup = {
	NULL,
	NULL,
	NULL,
	intro,
	props,
	paths,
	ailists,
	NULL,
};

u32 props[] = {
	briefing(BRIEFINGTYPE_LOCATION, L_ARK_001)
	briefing(BRIEFINGTYPE_TEXT_PA,  L_ARK_000)
	briefing(BRIEFINGTYPE_TEXT_SA,  L_ARK_002)
	briefing(BRIEFINGTYPE_TEXT_A,   L_ARK_003)

	beginobjective(0, L_ARK_009, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Access foyer elevator"
		complete_flags(STAGEFLAG_ACCESSED_FOYER_ELEVATOR)
	endobjective

	beginobjective(1, L_ARK_010, (DIFFBIT_PA | DIFFBIT_PD)) // "Reactivate office elevator"
		complete_flags(STAGEFLAG_ELEVATOR_UNLOCKED)
		fail_flags(STAGEFLAG_ELEVATOR_PC_DESTROYED)
	endobjective

	beginobjective(2, L_ARK_011, (DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Destroy dataDyne hovercopter"
		complete_flags(STAGEFLAG_HOVERCOPTER_DESTROYED)
	endobjective

	beginobjective(3, L_ARK_012, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Defeat Cassandra's bodyguards"
		complete_flags(STAGEFLAG_OBJECTIVE_BODYGUARDS_DEAD)
	endobjective

	beginobjective(4, L_ARK_013, (DIFFBIT_A | DIFFBIT_SA | DIFFBIT_PA | DIFFBIT_PD)) // "Rendezvous at helipad"
		complete_flags(STAGEFLAG_REACHED_HELIPAD)
		fail_flags(STAGEFLAG_DRCAROLL_DEAD)
	endobjective

	fan(0x0100, MODEL_DD_FANROOF, PAD_ARK_0087, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000444, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_DD_FANROOF, PAD_ARK_0088, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000444, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_DD_FANROOF, PAD_ARK_0089, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000444, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_DD_FANROOF, PAD_ARK_008A, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000444, 0x00000002, 0x01000000)
	fan(0x0100, MODEL_DD_FANWALL, PAD_ARK_008B, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000, 0x00000222, 0x00000002, 0x01000000)
	tag(0x0b, 1)
	chopper(0x004c, MODEL_DD_HOVERCOPTER, PAD_ARK_0190, OBJFLAG_00000008 | OBJFLAG_CHOPPER_INIT, OBJFLAG2_EXCLUDE_A | OBJFLAG2_NOFALL, OBJFLAG3_REACTTOSIGHT, 1000, AILIST_HOVERCOPTER)
	tag(0x10, 1)
	stdobject(0x0100, MODEL_DDJUMPSHIP, -1, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_IGNOREROOMCOLOUR | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	tag(0x0c, 2)
	tag(0x0d, 2)
	door(0x0100, MODEL_DOOR4A_G5, PAD_ARK_0224, OBJFLAG_IGNOREFLOORCOLOUR, 0, OBJFLAG3_AUTOCUTSCENESOUNDS, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00001200)
	door(0x0100, MODEL_DOOR4B_G5, PAD_ARK_0223, OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_DECODOOR, PAD_ARK_021E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000040, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_DECODOOR, PAD_ARK_021F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_0221, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000040, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_0222, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000040, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_SECRETDOOR, PAD_ARK_0220, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004 | DOORFLAG_AUTOMATIC | DOORFLAG_LONGRANGE, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_SECRETDOOR, PAD_ARK_00AE, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004 | DOORFLAG_AUTOMATIC | DOORFLAG_LONGRANGE, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0092, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0093, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000004, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0094, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0095, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0096, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0097, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0098, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_0099, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A4, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A5, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009A, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009B, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_009F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A0, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A3, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A1, OBJFLAG_DEACTIVATED, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x005a0000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_SWINGING, 0x00000040, 0x000005dc, 0x00000000, 0x00000001, 0x00000800)
	door(0x0100, MODEL_DD_OFFICEDOOR, PAD_ARK_00A2, OBJFLAG_DEACTIVATED | OBJFLAG_DOOR_OPENTOFRONT, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x005a0000, 0x03e80000, 0x00640000, 0x00640000, 0x00010000, 0, DOORTYPE_SWINGING, 0x00000040, 0x000005dc, 0x00000000, 0xffffffff, 0x00000000)
	door(0x0100, MODEL_DD_SERVICEDOOR, PAD_ARK_00A6, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_SERVICEDOOR, PAD_ARK_00A7, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, OBJFLAG2_LOCKEDBACK, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000002, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	tag(0x11, 1)
	door(0x0100, MODEL_DD_SERVICEDOOR, PAD_ARK_00A8, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	tag(0x04, 1)
	door(0x0100, MODEL_DD_SERVICEDOOR, PAD_ARK_00A9, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004 | DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	door(0x0100, MODEL_DD_SERVICEDOOR, PAD_ARK_00AD, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x0000f333, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, DOORFLAG_0004 | DOORFLAG_FLIP, DOORTYPE_SLIDING, 0x00000000, 0x00000384, 0x00000000, 0x00000000, 0x00000800)
	tag(0x05, 1)
	door(0x0100, MODEL_DD_WINDDOOR, PAD_ARK_00AA, OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED | OBJFLAG_DOOR_OPENTOFRONT, OBJFLAG2_LOCKEDFRONT | OBJFLAG2_AICANNOTUSE, 0, 1000, 0x005a0000, 0x03e80000, 0x012c0000, 0x012c0000, 0x00030000, 0, DOORTYPE_SWINGING, 0x00000000, 0x000005dc, 0x00000000, 0x00000000, 0x00000b00)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DD_WINDDOOR, PAD_ARK_00AB, OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED | OBJFLAG_DOOR_TWOWAY, 0, 0, 1000, 0x005a0000, 0x03e80000, 0x012c0000, 0x012c0000, 0x00030000, 0, DOORTYPE_SWINGING, 0x00000000, 0x000005dc, 0x00000000, 0x00000000, 0x00000b00)
	door(0x0100, MODEL_DD_WINDDOOR, PAD_ARK_00AC, OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED | OBJFLAG_DOOR_TWOWAY, 0, 0, 1000, 0x005a0000, 0x03e80000, 0x012c0000, 0x012c0000, 0x00030000, 0, DOORTYPE_SWINGING, 0x00000000, 0x000005dc, 0x00000000, 0x00000000, 0x00000b00)
#else
	door(0x0100, MODEL_DD_WINDDOOR, PAD_ARK_00AB, OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED | OBJFLAG_DOOR_OPENTOFRONT, 0, 0, 1000, 0x005a0000, 0x03e80000, 0x012c0000, 0x012c0000, 0x00030000, 0, DOORTYPE_SWINGING, 0x00000000, 0x000005dc, 0x00000000, 0x00000000, 0x00000b00)
	door(0x0100, MODEL_DD_WINDDOOR, PAD_ARK_00AC, OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x005a0000, 0x03e80000, 0x012c0000, 0x012c0000, 0x00030000, 0, DOORTYPE_SWINGING, 0x00000000, 0x000005dc, 0x00000000, 0x00000000, 0x00000b00)
#endif
	tag(0x20, 6)
	tag(0x21, 6)
	tag(0x22, 6)
	tag(0x23, 6)
	tag(0x1d, 1)
	lift(0x0100, MODEL_DD_LIFTR, PAD_ARK_011D, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, PAD_ARK_011D, PAD_ARK_0259, -1, -1, 0x00000001, 0x00000004, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x16000000)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#else
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008E, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#endif
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_021C, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000000, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	lift_door(-4, -5, 0)
	lift_door(-2, -6, 1)
	tag(0x24, 8)
	tag(0x25, 8)
	tag(0x26, 8)
	tag(0x27, 8)
	tag(0x02, 4)
	tag(0x03, 4)
	tag(0x1e, 1)
	lift(0x0100, MODEL_DD_LIFTR, PAD_ARK_011E, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000, PAD_ARK_011E, PAD_ARK_0120, -1, -1, 0x00000001, 0x00000002, 0x00000000, 0x00000000, 0x0000071c, 0x0010aaaa, 0x16000000)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_008F, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000001, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_0090, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000001, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_0091, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_021D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_AICANNOTUSE, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#else
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_0091, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
	door(0x0100, MODEL_DD_LIFTDOOR, PAD_ARK_021D, OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x0000e666, 0x00010000, 0x00007fff, 0x00014000, 0x00000666, 0, DOORTYPE_SLIDING, 0x00000002, 0x000001e0, 0x00000000, 0x00000000, 0x00001c00)
#endif
	lift_door(-4, -5, 0)
	lift_door(-4, -6, 1)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00AF, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B0, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B1, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B2, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B3, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B4, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B5, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B6, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B7, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B8, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00B9, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00BA, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00BC, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00BD, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00BE, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00BF, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00C0, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_00C1, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023A, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023B, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023C, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023D, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023E, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	stdobject(0x0200, MODEL_DD_PLANTSPIKE, PAD_ARK_023F, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_AISEETHROUGH, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_SHOOTTHROUGH, 0, 1000)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_010F, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0110, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_024D, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_024E, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_024F, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0250, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0251, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0252, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0253, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0254, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0255, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW_FOYER, PAD_ARK_024B, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	glass(0x0100, MODEL_DD_WINDOW_FOYER, PAD_ARK_024C, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D2, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D3, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D4, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D5, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D6, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D7, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D8, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D9, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DA, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DB, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DC, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DD, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DE, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00DF, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E0, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E1, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E2, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E3, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E4, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E5, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E6, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E7, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E8, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00E9, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00EA, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00EB, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00EC, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00ED, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00EE, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00EF, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F0, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F1, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F2, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F3, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F4, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F6, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F5, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F7, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F8, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00F9, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FA, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FB, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FC, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FD, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FE, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00FF, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0100, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0101, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0102, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0103, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0104, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0105, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0106, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0107, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_010B, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_010C, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_010D, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_010E, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	stdobject(0x0100, MODEL_DD_REDSOFA, PAD_ARK_00C4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00C5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00C2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00C7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00C8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00C9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDSOFA, PAD_ARK_00C6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_00CA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDSOFA, PAD_ARK_0256, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_0257, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01A0, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_019F, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	tag(0x01, 1)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_019E, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, OBJFLAG3_INTERACTABLE, 1000, 3)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01A1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01A2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01A3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01A4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01A5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01A6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01A7, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01A8, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01A9, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01AC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01AB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01AA, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01AD, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_LIGHTSWITCH2, PAD_ARK_012E, OBJFLAG_FALL, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01AF, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01B1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01B2, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_REDSOFA, PAD_ARK_00CB, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_01B3, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_01B4, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_01B5, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00CC, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_REDARM, PAD_ARK_00CD, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_NOFALL | OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_CHAIR, PAD_ARK_0225, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_0226, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_0228, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_022A, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	singlemonitor(0x0100, MODEL_PC1, PAD_ARK_022B, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR, 0, 0, 1000, 3)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0232, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0233, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0234, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0235, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0236, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0237, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0238, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_0239, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_01CE, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_01CF, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x00e6, MODEL_BLASTSHIELD, PAD_ARK_01D0, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_BLASTSHIELD, PAD_ARK_01D1, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_DD_DESK, PAD_ARK_022F, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	stdobject(0x0100, MODEL_QUADPOD, PAD_ARK_01B6, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR, OBJFLAG2_IMMUNETOANTI, 0, 1000)
	tag(0x1f, 1)
	weapon(0x0100, MODEL_CHRDYROCKET, PAD_ARK_01C4, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_WEAPON_NOAMMO, OBJFLAG2_IMMUNETOANTI, 0, WEAPON_ROCKETLAUNCHER)
	camera2(0x0000, 0xffff9931, 0xfffea6ce, 0x00003a3e, 0x00410000, 0x00000000, PAD_ARK_001B)
	tag(0x06, -1)
	camera2(0x0000, 0xffffba1e, 0xfffeba56, 0xffff7356, 0x01560000, 0x00000000, PAD_ARK_001B)
	tag(0x07, -1)
	camera2(0x0000, 0xffff5d8a, 0xfffeba56, 0x00000924, 0x01499eb8, 0x00000000, PAD_ARK_001B)
	tag(0x08, -1)
	camera2(0x0000, 0xffff85c6, 0xffff3b3e, 0xffff6672, 0xfffcdbc7, 0x00000000, PAD_ARK_01CC)
	tag(0x09, -1)
	tag(0x0e, 1)
	stdobject(0x0100, MODEL_CHRNIGHTSIGHT, -1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_COLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	rename_object(-1, WEAPON_NIGHTVISION, L_ARK_027, L_ARK_028, L_ARK_029, L_ARK_030, L_ARK_031) // "Obtain Night Vision."
	tag(0x17, 1)
	stdobject(0x0100, MODEL_CHRNIGHTSIGHT, -1, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_COLLECTABLE | OBJFLAG_BOUNCEIFSHOT | OBJFLAG_01000000, OBJFLAG2_IMMUNETOGUNFIRE, 0, 1000)
	rename_object(-1, WEAPON_NIGHTVISION, L_ARK_027, L_ARK_028, L_ARK_029, L_ARK_030, L_ARK_031) // "Obtain Night Vision."
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x00, PAD_ARK_0210, BODY_DRCAROLL, HEAD_RANDOM, AILIST_INIT_DRCAROLL, -1, -1, 1000, 100, 0, 0, TEAM_ALLY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_BASICGUARD, 0x01, PAD_ARK_0215, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 7, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0001, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x02, PAD_ARK_021B, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 7, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0002, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x03, PAD_ARK_0214, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 8, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0003, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x04, PAD_ARK_0213, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0004, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_DEACTIVATED, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x05, PAD_ARK_0216, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 8, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0005, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	weapon(0x0100, MODEL_CHRDY357, 0x0005, OBJFLAG_ASSIGNEDTOCHR | OBJFLAG_WEAPON_AICANNOTUSE, 0, 0, WEAPON_DY357MAGNUM)
	tag(0x1c, -1)
	chr(SPAWNFLAG_BASICGUARD, 0x06, PAD_ARK_0211, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 8, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0006, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x07, PAD_ARK_0212, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 8, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0007, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x08, PAD_ARK_0217, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 8, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0008, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x09, PAD_ARK_0218, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0009, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x0a, PAD_ARK_0219, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x000a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x0b, PAD_ARK_01BE, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x000b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x0c, PAD_ARK_01BF, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x000c, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_BASICGUARD, 0x0d, PAD_ARK_01C0, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x000d, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(0, 0x0e, PAD_ARK_01C1, BODY_DDSHOCK, HEAD_DDSHOCK, GAILIST_IDLE, -1, -1, 50, 100, CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_00008000 | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x000e, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x0f, PAD_ARK_01C2, BODY_OFFICEWORKER, HEAD_RANDOM, AILIST_INIT_TECH1, -1, -1, 50, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS, 0, TEAM_NONCOMBAT, SQUADRON_07, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x10, PAD_ARK_01C3, BODY_OFFICEWORKER, HEAD_RANDOM, AILIST_INIT_TECH2, -1, -1, 50, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS, 0, TEAM_NONCOMBAT, SQUADRON_07, -1, 0, 0, 0, 0, 0)
#if VERSION >= VERSION_NTSC_1_0
	chr(SPAWNFLAG_FORCESUNGLASSES | SPAWNFLAG_ANTINONINTERACTABLE, 0x11, PAD_ARK_01C5, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#else
	chr(SPAWNFLAG_FORCESUNGLASSES, 0x11, PAD_ARK_01C5, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#endif
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0011, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
#if VERSION >= VERSION_NTSC_1_0
	chr(SPAWNFLAG_FORCESUNGLASSES | SPAWNFLAG_ANTINONINTERACTABLE, 0x12, PAD_ARK_01C6, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#else
	chr(SPAWNFLAG_FORCESUNGLASSES, 0x12, PAD_ARK_01C6, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#endif
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0012, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
#if VERSION >= VERSION_NTSC_1_0
	chr(SPAWNFLAG_FORCESUNGLASSES | SPAWNFLAG_ANTINONINTERACTABLE, 0x13, PAD_ARK_01C7, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#else
	chr(SPAWNFLAG_FORCESUNGLASSES, 0x13, PAD_ARK_01C7, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#endif
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0013, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
#if VERSION >= VERSION_NTSC_1_0
	chr(SPAWNFLAG_FORCESUNGLASSES | SPAWNFLAG_ANTINONINTERACTABLE, 0x14, PAD_ARK_01C8, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#else
	chr(SPAWNFLAG_FORCESUNGLASSES, 0x14, PAD_ARK_01C8, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#endif
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0014, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
#if VERSION >= VERSION_NTSC_1_0
	chr(SPAWNFLAG_FORCESUNGLASSES | SPAWNFLAG_ANTINONINTERACTABLE, 0x15, PAD_ARK_01CC, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#else
	chr(SPAWNFLAG_FORCESUNGLASSES, 0x15, PAD_ARK_01CC, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_INIT_TOP_GUARD, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
#endif
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0015, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_ANTINONINTERACTABLE | SPAWNFLAG_BLUESIGHT, 0x1c, PAD_ARK_01C9, BODY_CASSANDRA, HEAD_CASSANDRA, AILIST_CASS, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS, 0, TEAM_NONCOMBAT, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x1d, PAD_ARK_0206, BODY_MRBLONDE, HEAD_MRBLONDE, GAILIST_INVINCIBLE_AND_IDLE, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x1e, PAD_ARK_0204, BODY_DDSHOCK, HEAD_DARLING, GAILIST_INVINCIBLE_AND_IDLE, -1, -1, 1000, 100, 0, 0, TEAM_ENEMY, SQUADRON_00, -1, 0, 0, 0, 0, 0)
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x1f, PAD_ARK_0207, BODY_FEM_GUARD, HEAD_RANDOM, GAILIST_INVINCIBLE_AND_IDLE, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x001f, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_ANTINONINTERACTABLE, 0x20, PAD_ARK_0203, BODY_FEM_GUARD, HEAD_RANDOM, GAILIST_INVINCIBLE_AND_IDLE, -1, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0020, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x16, PAD_ARK_0070, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_DEFEND_PAD, PAD_ARK_006A, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0016, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x17, PAD_ARK_0081, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_DEFEND_PAD, PAD_ARK_006A, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0017, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x18, PAD_ARK_0071, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_GENERAL_COMBAT, PAD_ARK_006A, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0018, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x19, PAD_ARK_0048, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_GENERAL_COMBAT, PAD_ARK_006A, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x0019, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x1a, PAD_ARK_0047, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_DEFEND_PAD, PAD_ARK_0044, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x001a, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x1b, PAD_ARK_004A, BODY_FEM_GUARD, HEAD_RANDOM, AILIST_DEFEND_PAD, PAD_ARK_0044, -1, 1000, 100, CHRFLAG0_SURPRISABLE | CHRFLAG0_FORCESAFETYCHECKS | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRSHOTGUN, 0x001b, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_SHOTGUN)
	chr(SPAWNFLAG_BASICGUARD, 0x22, PAD_ARK_007E, BODY_DDSHOCK, HEAD_DDSHOCK, AILIST_INIT_SHOCK, -1, -1, 1000, 9, CHRFLAG0_SURPRISABLE | CHRFLAG0_SKIPSAFETYCHECKS | CHRFLAG0_AIVSAI | CHRFLAG0_CANLOSEGUN, 0, TEAM_ENEMY, SQUADRON_01, -1, 0, 0, 0, 0, 0)
	weapon(0x0100, MODEL_CHRCMP150, 0x0022, OBJFLAG_ASSIGNEDTOCHR, 0, 0, WEAPON_CMP150)
	key(0x0080, MODEL_KEYCARD, 0x0022, OBJFLAG_ASSIGNEDTOCHR, 0, 0, 64)
	rename_object(-1, WEAPON_KEYCARD4C, L_ARK_055, L_ARK_056, L_ARK_057, L_ARK_058, L_ARK_059) // "Obtain alpha key card."
	conditional_scenery(1, 0, 2)
#if VERSION >= VERSION_NTSC_1_0
	door(0x0100, MODEL_DD_AC_UNEXP, PAD_ARK_019B, OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS | OBJFLAG2_AICANNOTUSE, OBJFLAG3_04000000, 1000, 0x00000000, 0x00010000, 0x03e80000, 0x03e80000, 0x00010000, 0, DOORTYPE_SLIDING, 0x00000080, 0x00000001, 0x00010000, 0x00000000, 0x00000000)
	stdobject(0x0100, MODEL_DD_AC_EXP, PAD_ARK_019D, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
#else
	door(0x0100, MODEL_DD_AC_UNEXP, PAD_ARK_019B, OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS | OBJFLAG2_AICANNOTUSE, OBJFLAG3_04000000, 1000, 0x00000000, 0x00010000, 0x03e80000, 0x03e80000, 0x00010000, 0, DOORTYPE_SLIDING, 0x00000080, 0x00000001, 0x00010000, 0x00000000, 0x00000000)
	stdobject(0x0100, MODEL_DD_AC_EXP, PAD_ARK_019D, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_UNCOLLECTABLE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
#endif
	conditional_scenery(1, 0, 2)
	door(0x0100, MODEL_DD_ACBOT_UNEXP, PAD_ARK_019A, OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_PATHBLOCKER | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE | OBJFLAG_DEACTIVATED, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS | OBJFLAG2_AICANNOTUSE, OBJFLAG3_04000000, 1000, 0x00000000, 0x00010000, 0x03e80000, 0x03e80000, 0x00010000, 0, DOORTYPE_SLIDING, 0x00000080, 0x00000001, 0x00010000, 0x00000000, 0x00000000)
#if VERSION >= VERSION_NTSC_1_0
	stdobject(0x0100, MODEL_DD_ACBOT_EXP, PAD_ARK_019C, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
#else
	stdobject(0x0100, MODEL_DD_ACBOT_EXP, PAD_ARK_019C, OBJFLAG_00000008 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_UNCOLLECTABLE | OBJFLAG_FORCENOBOUNCE | OBJFLAG_01000000 | OBJFLAG_CANNOT_ACTIVATE, OBJFLAG2_NOFALL | OBJFLAG2_FALLWITHOUTROTATION | OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_BULLETPROOF | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
#endif
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_ARK_0130, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_ARK_0131, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_ARK_0132, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_A51_CRATE2, PAD_ARK_0133, OBJFLAG_FALL | OBJFLAG_00000100 | OBJFLAG_INVINCIBLE, 0, 0, 1000)
	stdobject(0x0100, MODEL_DD_STONEDESK, PAD_ARK_0124, OBJFLAG_FALL | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_ZTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_IGNOREFLOORCOLOUR | OBJFLAG_INVINCIBLE, OBJFLAG2_IMMUNETOGUNFIRE | OBJFLAG2_IMMUNETOEXPLOSIONS, 0, 1000)
	multimonitor(0x0099, MODEL_COMHUB, PAD_ARK_012C, OBJFLAG_00000002, 0, 0, 1000, 3, 3, 3, 0)
	tag(0x0a, 1)
	stdobject(0x0100, MODEL_LIGHTSWITCH, PAD_ARK_012D, OBJFLAG_00000002, 0, OBJFLAG3_INTERACTABLE, 1000)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0111, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0112, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0113, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0114, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0119, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_011A, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0117, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_0118, OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00CE, OBJFLAG_FALL | OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00CF, OBJFLAG_FALL | OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D0, OBJFLAG_FALL | OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x04b007d0)
	tinted_glass(0x0100, MODEL_DD_WINDOW, PAD_ARK_00D1, OBJFLAG_FALL | OBJFLAG_00000002 | OBJFLAG_XTOPADBOUNDS | OBJFLAG_YTOPADBOUNDS | OBJFLAG_00000100 | OBJFLAG_ORTHOGONAL | OBJFLAG_PATHBLOCKER | OBJFLAG_AISEETHROUGH | OBJFLAG_DEACTIVATED, 0, 0, 1000, 0x04b007d0)
	tag(0x18, 1)
	shield(0x0100, MODEL_CHRSHIELD, PAD_ARK_0078, OBJFLAG_FALL, OBJFLAG2_EXCLUDE_SA | OBJFLAG2_EXCLUDE_PA | OBJFLAG2_EXCLUDE_PD, 0, 1000)
	tag(0x19, 1)
	tag(0x1a, 1)
	weapon(0x0100, MODEL_CHRGRENADE, PAD_ARK_01D2, OBJFLAG_FALL, OBJFLAG2_IMMUNETOANTI, 0, WEAPON_GRENADE)
	tag(0x1b, 1)
	weapon(0x0100, MODEL_CHRDRAGON, PAD_ARK_01D3, OBJFLAG_FALL, OBJFLAG2_IMMUNETOANTI, 0, WEAPON_DRAGON)
	tag(0x14, 1)
	weapon(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_ARK_0204, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, WEAPON_ROCKETLAUNCHER)
	tag(0x15, 1)
	weapon(0x0100, MODEL_MULTI_AMMO_CRATE, PAD_ARK_0207, OBJFLAG_FALL | OBJFLAG_00000100, OBJFLAG2_IMMUNETOANTI, 0, WEAPON_ROCKETLAUNCHER)
	endprops
};

s32 intro[] = {
	intro_weapon(WEAPON_FALCON2_SCOPE, -1)
	ammo(AMMOTYPE_PISTOL, 50)
	ammo(AMMOTYPE_RIFLE, 160)
	ammo(AMMOTYPE_MAGNUM, 2)
	ammo(AMMOTYPE_ROCKET, 1)
	outfit(OUTFIT_DEFAULT)
	spawn(PAD_ARK_025A)
	endintro
};

s32 path00[] = {
	PAD_ARK_018F,
	PAD_ARK_018E,
	PAD_ARK_0191,
	PAD_ARK_0190,
	-1,
};

s32 path01[] = {
	PAD_ARK_0192,
	PAD_ARK_0193,
	PAD_ARK_0194,
	PAD_ARK_0195,
	-1,
};

s32 path02[] = {
	PAD_ARK_0196,
	PAD_ARK_0197,
	PAD_ARK_0198,
	PAD_ARK_0199,
	-1,
};

struct path paths[] = {
	{ path00, 0, 0 },
	{ path01, 1, 0 },
	{ path02, 2, 0 },
	{ NULL, 0, 0 },
};

/**
 * @unused
 */
u8 func0403_stop_and_idle[] = {
	stop_chr

	beginloop(0x00)
	endloop(0x00)

	endlist
};

u8 func0404_init_drcaroll[] = {
	set_self_chrflag(CHRCFLAG_PUSHABLE)
	set_shield(100)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0402_start_drcaroll[] = {
	stop_chr
	set_ailist(CHR_SELF, AILIST_DRCAROLL_FOLLOWING)
	endlist
};

u8 func0401_drcaroll_following[] = {
	set_shotlist(AILIST_DRCAROLL_FOLLOWING)
	set_self_chrflag(CHRCFLAG_NEVERSLEEP)
	stop_chr
	set_target_chr(CHR_BOND)
	try_jog_to_target(/*goto*/ 0x00)
	label(0x00)
	yield
	set_target_chr(CHR_BOND)
	if_chr_dead(CHR_SELF, /*goto*/ 0x00)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x00)
	goto_next(0x20)

	label(0x00)
	set_shotlist(GAILIST_IDLE)
	restart_timer

	beginloop(0x0b)
		if_timer_gt(15, /*goto*/ 0x00)
	endloop(0x0b)

	label(0x00)
	say_quip(CHR_TARGET, 0x06, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	set_target_chr(CHR_BOND)
	set_shield(100)
	set_chr_maxdamage(CHR_SELF, 100)
	label(0x20)
	dprint 'b','4',' ','s','h','i','e','l','d',' ','c','h','e','c','k','\n',0,
	if_chr_shield_damaged(CHR_SELF, /*goto*/ 0x00)
	goto_next(0x02)

	label(0x00)
	restart_timer
	say_quip(CHR_TARGET, 0x04, 0xff, 0x03, 0xff, BANK_1, 0x00, 0x00)

	beginloop(0x0d)
		if_num_times_shot_lt(1, /*goto*/ 0x00)
		if_timer_lt(20, /*goto*/ 0x00)
		label(0x00)
		if_chr_stopped(/*goto*/ 0x02)
	endloop(0x0d)

	label(0x02)
		stop_chr
		restart_timer

		beginloop(0x03)
			if_chr_y(CHR_TARGET, -1910, OPERATOR_LESS_THAN, /*goto*/ 0x20)
			label(0x20)
			dprint 't','a','r','g','e','t','\n',0,
			if_los_to_target(/*goto*/ 0x00)
			goto_next(0x04)

			label(0x00)
			if_timer_gt(1250, /*goto*/ 0x20)
			if_distance_to_target_gt(200, /*goto*/ 0x04)
		endloop(0x03)

		label(0x20)
		call_rng
		if_rand_lt(64, /*goto*/ 0x20)
		say_quip(CHR_TARGET, 0x02, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00)
		goto_first(0x02)

		label(0x20)
		say_quip(CHR_TARGET, 0x03, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00)
		goto_first(0x02)

		label(0x00)
		say_quip(CHR_TARGET, 0x07, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00)
	goto_first(0x02)

	label(0x04)
		restart_timer
		if_chr_y(CHR_DRCAROLL, -2100, OPERATOR_LESS_THAN, /*goto*/ 0x20)
		try_run_to_target(/*goto*/ 0x05)
		label(0x20)
		if_distance_to_target_lt(200, /*goto*/ 0x20)
		try_run_to_target(/*goto*/ 0x05)
		label(0x20)
		try_jog_to_target(/*goto*/ 0x05)

		beginloop(0x05)
			if_chr_in_room(CHR_TARGET, 0x00, 0x0094, /*goto*/ 0x00)
			goto_next(0x20)

			label(0x00)
			label(0x20)
			label(0x00)
			if_distance_to_target_lt(200, /*goto*/ 0x06)
			if_chr_stopped(/*goto*/ 0x06)
			if_timer_gt(360, /*goto*/ 0x20)
		endloop(0x05)

		label(0x20)
		say_quip(CHR_TARGET, 0x03, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00)
		goto_first(0x04)

		label(0x00)
		say_quip(CHR_TARGET, 0x07, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00)
	goto_first(0x04)

	label(0x06)
	goto_first(0x02)

	label(0x07)
	try_run_to_target(/*goto*/ 0x08)

	beginloop(0x08)
	endloop(0x08)

	label(0x09)
	goto_first(0x02)

	// Unreachable
	// Attempts to teleport Dr Caroll up the elevator shaft from foyer
	label(0x5c)
	dprint 'D','R',' ','C','H','A','N','G','E','L','I','S','T','\n',0,
	if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20)
	chr_move_to_pad(CHR_DRCAROLL, PAD_ARK_0079, FALSE, /*goto*/ 0x00)
	dprint 'T','E','L','E','P','O','R','T',' ','F','A','I','L','\n',0,
	label(0x00)
	goto_first(0x02)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * Waiting at the door to the top room while you clear it out.
 */
u8 func0405_drcaroll_waiting[] = {
	if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20)
	goto_next(0x00)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x00)
	dprint 'D','R',' ','C','H','A','N','G','E','L','I','S','T','\n',0,
	set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_WARPONSCREEN)
	chr_move_to_pad(CHR_DRCAROLL, PAD_ARK_01CA, FALSE, /*goto*/ 0x00)
	dprint 'M','O','V','E',' ','F','A','I','L','\n',0,
	label(0x00)
	stop_chr

	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_TOP_BODYGUARDS_DEAD, TRUE, /*goto*/ 0x00)
	endloop(0x1f)

	label(0x00)
	set_ailist(CHR_SELF, AILIST_DRCAROLL_FOLLOWING)
	endlist
};

u8 func100c_foyer_lights_timer[] = {
	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_OFF, TRUE, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x2e)
	if_difficulty_lt(DIFF_PA, /*goto*/ 0x2f)

	// PA
	set_countdown_timer(60)
	start_countdown_timer
	show_countdown_timer
	goto_next(0x0e)

	// Agent
	label(0x2e)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Unreachable
	set_countdown_timer(60)
	start_countdown_timer
	show_countdown_timer
	goto_next(0x0e)

	// SA
	label(0x2f)
	set_countdown_timer(90)
	start_countdown_timer
	show_countdown_timer

	beginloop(0x0e)
		if_countdown_timer_lt(1, /*goto*/ 0x0f)
	endloop(0x0e)

	label(0x0f)
	set_stage_flag(STAGEFLAG_FOYER_LIGHTS_RESTORED)
	hide_countdown_timer
	stop_countdown_timer
	set_lights_state(0x0019, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001a, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001b, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001c, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001d, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001e, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x001f, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0020, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0021, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0017, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0018, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0016, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0022, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0023, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0024, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0025, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0026, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0027, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0028, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0029, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002a, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002b, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002c, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002d, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002e, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x002f, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0030, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0031, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0032, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0033, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0034, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0035, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0036, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0015, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x000f, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x000e, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0010, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0011, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0012, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0013, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x0014, LIGHTOP_SET, 100, 0, 0)
	set_lights_state(0x000d, LIGHTOP_SET, 100, 0, 0)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0410_init_top_guard[] = {
	set_shotlist(AILIST_TOP_GUARD)
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x20)

	// SA and PA
	set_chr_dodge_rating(2, 10)
	set_accuracy(80)
	set_reaction_speed(10)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	goto_next(0x00)

	// Agent
	label(0x20)
	set_chr_dodge_rating(2, 10)
	set_accuracy(12)
	set_reaction_speed(10)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)

	label(0x00)
	beginloop(0x8d)
		if_stage_flag_eq(STAGEFLAG_ENTERING_TOP_ROOM, TRUE, /*goto*/ 0x20)
	endloop(0x8d)

	label(0x20)
	set_ailist(CHR_SELF, AILIST_TOP_GUARD)
	endlist
};

u8 func040f_top_guard[] = {
	if_just_injured(CHR_SELF, /*goto*/ 0x20)
	goto_next(0x00)

	label(0x20)
	set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED)

	beginloop(0x21)
		if_chr_stopped(/*goto*/ 0x00)
	endloop(0x21)

	label(0x00)
	try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x1f)

	beginloop(0x1f)
		if_distance_to_target_lt(200, /*goto*/ 0x20)
		if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x00)
		if_stage_flag_eq(STAGEFLAG_TOP_GUARDS_ATTACKING, TRUE, /*goto*/ 0x00)
		set_target_chr(CHR_PRESET)
	endloop(0x1f)

	label(0x00)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)

	label(0x20)
	set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)
	endlist
};

u8 func0411_top_guard_blinded[] = {
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x20)
	if_chr_dead(CHR_SELF, /*goto*/ 0x20)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x20)
	goto_next(0x00)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x00)
	chr_do_animation(ANIM_BLINDED, 0, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
	say_quip(CHR_BOND, 0x11, 0x64, 0x02, 0xff, BANK_1, 0x00, 0x00)

	beginloop(0x1f)
		if_chr_stopped(/*goto*/ 0x00)
	endloop(0x1f)

	label(0x00)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)
	endlist
};

u8 func0406_general_combat[] = {
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)
	set_shotlist(AILIST_GENERAL_COMBAT)
	if_has_gun(CHR_SELF, /*goto*/ 0x20)

	// No gun
	set_shotlist(GAILIST_ALERTED)
	set_ailist(CHR_SELF, GAILIST_ALERTED)

	// Has gun
	label(0x20)
	if_chr_dead(CHR_SELF, /*goto*/ 0x00)
	if_chr_death_animation_finished(CHR_SELF, /*goto*/ 0x00)
	if_chr_knockedout(CHR_SELF, /*goto*/ 0x00)
	goto_next(0x20)

	// Dying - wait a few frames then say quip
	label(0x00)
	set_shotlist(GAILIST_IDLE)
	restart_timer

	beginloop(0x0b)
		if_timer_gt(15, /*goto*/ 0x00)
	endloop(0x0b)

	label(0x00)
	say_quip(CHR_BOND, QUIP_DIE, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00)
	set_shotlist(GAILIST_IDLE)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Alive with gun
	label(0x20)
	if_just_injured(CHR_SELF, /*goto*/ 0x00)
	goto_next(0x21)

	// Just got injured
	label(0x00)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_DETECTED)
	restart_timer

	beginloop(0x0c)
		if_self_flag_bankx_eq(CHRFLAG0_SAID_INJURY_QUIP, TRUE, BANK_0, /*goto*/ 0x00)
		if_num_times_shot_lt(1, /*goto*/ 0x00)
		if_timer_lt(20, /*goto*/ 0x00)
		say_quip(CHR_BOND, QUIP_INJURED1, 0x28, 0x03, 0x00, BANK_0, 0x00, 0x00)
		say_quip(CHR_BOND, QUIP_INJURED2, 0x28, 0x03, 0x01, BANK_0, 0x00, 0x00)
		set_self_flag_bankx(CHRFLAG0_SAID_INJURY_QUIP, BANK_0)
		label(0x00)
		if_chr_stopped(/*goto*/ 0x21)
	endloop(0x0c)

	// Not injured, or injury recovery finished
	label(0x21)
	set_self_chrflag(CHRCFLAG_NOFRIENDLYFIRE)

	label(0x14)
		if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x00)
		label(0x20)
		try_attack_kneel(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x10)
		label(0x00)
		kneel

		beginloop(0x10)
			if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
			goto_next(0x20)

			// Lights restored
			label(0x00)
			set_view_distance(100)

			label(0x20)
			chr_toggle_p1p2(CHR_SELF)
			set_target_chr(CHR_P1P2)
			if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
			if_can_see_target(/*goto*/ 0x15)
			goto_next(0x20)

			label(0x00)
			if_los_to_target(/*goto*/ 0x15)
			label(0x20)
			if_near_miss(/*goto*/ 0x18)
			if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
			if_enemy_distance_lt_and_los(500, /*goto*/ 0x20)
			goto_next(0x5e)

			label(0x00)
			if_enemy_distance_lt_and_los(2540, /*goto*/ 0x20)
			goto_next(0x5e)

			label(0x20)
			if_target_is_player(/*goto*/ 0x5e)
			goto_next(0x15)

			label(0x5e)
			set_target_chr(CHR_P1P2)
			reloop(0x10)

			label(0x00)
			if_can_see_target(/*goto*/ 0x15)
			if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
			if_enemy_distance_lt_and_los(500, /*goto*/ 0x20)
			goto_next(0x5e)

			label(0x00)
			if_enemy_distance_lt_and_los(2540, /*goto*/ 0x20)
			goto_next(0x5e)

			label(0x20)
			if_target_is_player(/*goto*/ 0x5e)
			goto_next(0x15)

			label(0x5e)
			set_target_chr(CHR_P1P2)
		endloop(0x10)

		label(0x15)
		set_chr_hiddenflag(CHR_BOND, CHRHFLAG_DETECTED)
		if_self_flag_bankx_eq(CHRFLAG1_HANDCOMBATONLY, TRUE, BANK_1, /*goto*/ 0x2a)
		if_distance_to_target_lt(250, /*goto*/ 0x29)
		if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ 0x20)
		set_self_flag_bankx(CHRFLAG0_GP1, BANK_0)
		if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)
		say_quip(CHR_BOND, QUIP_SEARCHSUCCESS, 0xff, 0x02, 0xff, BANK_0, 0x00, 0x00)
		goto_next(0x20)

		label(0x00)
		say_quip(CHR_BOND, QUIP_SEEPLAYER, 0xff, 0x02, 0xff, BANK_0, 0x00, 0x00)
		label(0x20)
		if_self_flag_bankx_eq(CHRFLAG0_SKIPSAFETYCHECKS, TRUE, BANK_0, /*goto*/ 0x17)
		try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x12)
		goto_next(0x13)

		beginloop(0x12)
			if_chr_stopped(/*goto*/ 0x13)
		endloop(0x12)

		label(0x13)
		if_chr_injured_target(CHR_SELF, /*goto*/ 0x20)
		say_quip(CHR_BOND, QUIP_MISSEDPLAYER1, 0x19, 0x03, 0x00, BANK_0, 0x00, 0x00)
		say_quip(CHR_BOND, QUIP_MISSEDPLAYER2, 0x19, 0x03, 0x01, BANK_0, 0x00, 0x00)
		goto_next(0x00)

		label(0x20)
		say_quip(CHR_BOND, QUIP_HITPLAYER, 0x19, 0x02, 0x00, BANK_0, 0x00, 0x00)
		say_quip(CHR_BOND, QUIP_HITPLAYER, 0x19, 0x03, 0x01, BANK_0, 0x00, 0x00)
		label(0x00)
	goto_first(0x14)

	label(0x18)
	restart_timer
	if_self_flag_bankx_eq(CHRFLAG0_GP1, TRUE, BANK_0, /*goto*/ 0x1c)
	set_self_flag_bankx(CHRFLAG0_GP1, BANK_0)
	if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x1c)
	say_quip(CHR_BOND, QUIP_SURPRISED, 0xff, 0x03, 0xff, BANK_0, 0x00, 0x00)

	beginloop(0x1c)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		call_rng
		if_can_see_target(/*goto*/ 0x19)
		if_timer_gt(60, /*goto*/ 0x1e)
		if_rand_lt(4, /*goto*/ 0x1e)
	endloop(0x1c)

	label(0x1e)
	if_los_to_target(/*goto*/ 0x19)
	goto_first(0x14)

	label(0x19)
	goto_first(0x15)

	label(0x1a)
	restart_timer

	beginloop(0x1b)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x19)
		if_timer_gt(300, /*goto*/ 0x00)
	endloop(0x1b)

	label(0x00)
	goto_first(0x14)

	label(0x19)
	goto_first(0x15)

	label(0x17)
	try_attack_stand(ATTACKFLAG_AIMATTARGET | ATTACKFLAG_AIMONLY, 0, /*goto*/ 0x16)
	label(0x16)
	say_quip(CHR_BOND, QUIP_ATTACK1, 0x19, 0x02, 0x01, BANK_0, 0x00, 0x00)
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x00)
	goto_next(0x20)
	label(0x00)
	goto_first(0x12)

	label(0x20)
	goto_first(0x13)

	label(0x29)
	try_jog_to_target(/*goto*/ 0x20)
	label(0x20)
	dprint 'U','N',' ','E','N','T','R','Y','\n',0,
	set_returnlist(CHR_SELF, AILIST_GENERAL_COMBAT)
	set_ailist(CHR_SELF, GAILIST_HAND_COMBAT)

	label(0x2a)
	label(0x20)
	if_target_is_player(/*goto*/ 0x20)
	set_shotlist(GAILIST_COMBAT_WITH_TARGET)
	set_returnlist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	set_ailist(CHR_SELF, GAILIST_COMBAT_WITH_TARGET)
	label(0x20)
	set_shotlist(GAILIST_ALERTED)
	set_returnlist(CHR_SELF, GAILIST_ALERTED)
	set_ailist(CHR_SELF, GAILIST_ALERTED)
	endlist
};

u8 func0408_hovercopter[] = {
	set_target_chr(CHR_BOND)
	chopper_arm_weapons
	move_object_to_pad(OBJ_HOVERCOPTER, PAD_ARK_0199)
	begin_hovercar_path(0x02)
	restart_timer
	set_chr_maxdamage(CHR_SELF, 42320)

	beginloop(0x1f)
		if_timer_gt(120, /*goto*/ 0x42)
	endloop(0x1f)

	label(0x42)
	yield
	if_chr_y(CHR_TARGET, -1850, OPERATOR_LESS_THAN, /*goto*/ 0x52)
	if_chr_y(CHR_TARGET, -1200, OPERATOR_LESS_THAN, /*goto*/ 0x53)
	goto_next(0x54)

	// Low combat (lowest floor)
	label(0x21)
	begin_hovercar_path(0x00)

	beginloop(0x22)
		dprint 'L','O','W','\n',0,
		if_chr_y(CHR_TARGET, -1850, OPERATOR_LESS_THAN, /*goto*/ 0x00)
		if_chr_y(CHR_TARGET, -1200, OPERATOR_LESS_THAN, /*goto*/ 0x53)
		if_stage_flag_eq(STAGEFLAG_CHOPPER_GO_TO_ROOF, FALSE, /*goto*/ 0x00)
		goto_next(0x54)

		label(0x00)
		set_target_chr(CHR_BOND)
		if_los_to_target(/*goto*/ 0x43)
		if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20)
		set_target_chr(CHR_COOP)
		if_los_to_target(/*goto*/ 0x43)
		set_target_chr(CHR_BOND)
		label(0x20)
	endloop(0x22)

	// Mid combat (second floor and Cass's office floor)
	label(0x23)
	begin_hovercar_path(0x01)

	beginloop(0x24)
		dprint 'M','I','D','\n',0,
		if_chr_y(CHR_TARGET, -1850, OPERATOR_LESS_THAN, /*goto*/ 0x52)
		dprint 'M','I','D','0','\n',0,
		if_chr_y(CHR_TARGET, -1200, OPERATOR_LESS_THAN, /*goto*/ 0x00)
		dprint 'M','I','D','1','\n',0,
		if_stage_flag_eq(STAGEFLAG_CHOPPER_GO_TO_ROOF, FALSE, /*goto*/ 0x00)
		dprint 'M','I','D','2','\n',0,
		goto_next(0x54)

		label(0x00)
		dprint 'M','I','D','3','\n',0,
		set_target_chr(CHR_BOND)
		if_los_to_target(/*goto*/ 0x48)
		dprint 'N','O','T','V','I','S','\n',0,
		if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20)
		set_target_chr(CHR_COOP)

		// @bug: This should go to 0x48. Instead it goes to the low code path,
		// which doesn't appear to have any side effects except that the
		// hovercopter will say the low line ("surrender or die") on the mid
		// level if Velvet is the first player it sees.
		if_los_to_target(/*goto*/ 0x43)
		set_target_chr(CHR_BOND)
		label(0x20)
	endloop(0x24)

	// High combat (roof)
	label(0x25)
	begin_hovercar_path(0x02)

	beginloop(0x26)
		set_target_chr(CHR_BOND)
		dprint 'T','O','P','\n',0,
		if_chr_y(CHR_TARGET, -1850, OPERATOR_LESS_THAN, /*goto*/ 0x52)
		if_chr_y(CHR_TARGET, -1200, OPERATOR_LESS_THAN, /*goto*/ 0x53)
		set_target_chr(CHR_BOND)
		if_los_to_target(/*goto*/ 0x4d)
		if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20)
		set_target_chr(CHR_COOP)
		if_los_to_target(/*goto*/ 0x4d)
		label(0x20)
		set_target_chr(CHR_BOND)
		label(0x00)
	endloop(0x26)

	// Change to high
	label(0x54)
	dprint 'C','H','A','N','G','E',' ','T','O',' ','H','I','G','H','\n',0,
	label(0x27)
	yield
	goto_next(0x00)
	label(0x00)
	if_los_to_target(/*goto*/ 0x20)
	move_object_to_pad(OBJ_HOVERCOPTER, PAD_ARK_0199)
	label(0x20)
	goto_first(0x25)

	// Change to low
	label(0x52)
	dprint 'C','H','A','N','G','E',' ','T','O',' ','L','O','W','\n',0,
	if_los_to_target(/*goto*/ 0x20)
	move_object_to_pad(OBJ_HOVERCOPTER, PAD_ARK_0190)
	label(0x20)
	goto_first(0x21)

	// Change to mid
	label(0x53)
	dprint 'C','H','A','N','G','E',' ','T','O',' ','M','I','D','\n',0,
	if_los_to_target(/*goto*/ 0x20)
	move_object_to_pad(OBJ_HOVERCOPTER, PAD_ARK_0195)
	label(0x20)
	goto_first(0x23)

	// Low shooting
	label(0x43)
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x44)
	goto_first(0x22)

	beginloop(0x44)
		if_los_to_target(/*goto*/ 0x47)
		restart_timer

		beginloop(0x45)
			if_timer_gt(480, /*goto*/ 0x46)
			if_los_to_target(/*goto*/ 0x47)
		endloop(0x45)

		label(0x46)
		stop_chr
		goto_first(0x22)

		label(0x47)
		if_stage_flag_eq(STAGEFLAG_SAID_SURRENDER_OR_DIE, TRUE, /*goto*/ 0x20)
		play_sound(MP3_030B, -1)
		set_stage_flag(STAGEFLAG_SAID_SURRENDER_OR_DIE)
		label(0x20)
	endloop(0x44)

	// Mid shooting
	label(0x48)
	dprint 'S','H','O','O','T',' ','M','I','D','\n',0,
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x49)
	goto_first(0x24)

	beginloop(0x49)
		if_los_to_target(/*goto*/ 0x4c)
		restart_timer

		beginloop(0x4a)
			if_timer_gt(180, /*goto*/ 0x4b)
			if_los_to_target(/*goto*/ 0x4c)
		endloop(0x4a)

		label(0x4b)
		stop_chr
		goto_first(0x24)

		label(0x4c)
		if_stage_flag_eq(STAGEFLAG_SAID_GIVE_UP, TRUE, /*goto*/ 0x20)
		play_sound(MP3_030D, -1)
		set_stage_flag(STAGEFLAG_SAID_GIVE_UP)
		label(0x20)
	endloop(0x49)

	// High shooting (roof)
	label(0x4d)
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x00)
	label(0x00)
	set_stage_flag(STAGEFLAG_HOVERCOPTER_ON_ROOF)
	if_stage_flag_eq(STAGEFLAG_SAID_FINAL_WARNING, TRUE, /*goto*/ 0x20)
	play_sound(MP3_030C, -1)
	set_stage_flag(STAGEFLAG_SAID_FINAL_WARNING)
	label(0x20)
	stop_chr
	restart_timer

	beginloop(0x29)
		if_timer_gt(180, /*goto*/ 0x00)
	endloop(0x29)

	label(0x00)
	try_modify_attack(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x00)
	goto_first(0x26)

	label(0x00)
	restart_timer

	beginloop(0x4e)
		if_los_to_target(/*goto*/ 0x51)
		restart_timer

		beginloop(0x4f)
			if_timer_gt(480, /*goto*/ 0x50)
			if_los_to_target(/*goto*/ 0x51)
		endloop(0x4f)

		label(0x50)
		stop_chr
		goto_first(0x26)

		label(0x51)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x20)
		if_timer_gt(500, /*goto*/ 0x27)
		label(0x20)
	endloop(0x4e)

	label(0x27)
	restart_timer
	hovercopter_fire_rocket(0) // left side
	goto_first(0x4e)

	// Unreachable - the hovercopter only fires rockets from the left side
	label(0x28)
	restart_timer
	hovercopter_fire_rocket(1) // right side
	goto_first(0x4e)

	endlist
};

u8 func1002_check_accessed_foyer_elevator[] = {
	beginloop(0x21)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_chr_y(CHR_TARGET, -8155, OPERATOR_LESS_THAN, /*goto*/ 0x20)
		if_chr_distance_to_pad_lt(CHR_TARGET, 300, PAD_ARK_021A, /*goto*/ 0x00)
		label(0x20)
	goto_first(0x21)

	label(0x00)
	set_stage_flag(STAGEFLAG_ACCESSED_FOYER_ELEVATOR)
	show_hudmsg(CHR_TARGET, L_ARK_033) // "Foyer elevator accessed."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1003_check_end_level[] = {
	beginloop(0x21)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_chr_distance_to_pad_lt(CHR_P1P2, 200, PAD_ARK_0002, /*goto*/ 0x00)
		reloop(0x21)

		label(0x00)
		if_chr_y(CHR_P1P2, 30, OPERATOR_LESS_THAN, /*goto*/ 0x20)
		goto_next(0x00)
		label(0x20)
		reloop(0x21)

		label(0x00)
		set_stage_flag(STAGEFLAG_REACHED_HELIPAD)
		yield
		if_all_objectives_complete(/*goto*/ 0x20)
	endloop(0x21)

	label(0x20)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x20)
	if_chr_dead(CHR_BOND, /*goto*/ 0x20)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x20)
	goto_next(0x00)

	label(0x20)
	if_chr_death_animation_finished(CHR_COOP, /*goto*/ 0x20)
	if_chr_dead(CHR_COOP, /*goto*/ 0x20)
	if_chr_knockedout(CHR_COOP, /*goto*/ 0x20)
	goto_next(0x00)

	label(0x20)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x00)
	set_invincible(CHR_BOND)
	set_ailist(CHR_SELF, AILIST_OUTRO)
	endlist
};

u8 func1004_elevator_unlocking[] = {
	yield
	if_difficulty_gt(DIFF_SA, /*goto*/ 0x1f)
	unlock_door(0x02, 0x01)
	unlock_door(0x03, 0x01)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	beginloop(0x1f)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_chr_activated_object(CHR_TARGET, 0x01, /*goto*/ 0x20)
		if_object_in_good_condition(0x01, /*goto*/ 0x00)
		goto_next(0x28)
		label(0x00)
	endloop(0x1f)

	// Computer destroyed
	label(0x28)
	if_stage_flag_eq(STAGEFLAG_ELEVATOR_UNLOCKED, TRUE, /*goto*/ 0x00)
	set_stage_flag(STAGEFLAG_ELEVATOR_PC_DESTROYED)
	show_hudmsg(CHR_BOND, L_ARK_045) // "Critical mission object destroyed."
	label(0x00)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Computer activated
	label(0x20)
	show_hudmsg(CHR_TARGET, L_ARK_014) // "Accessing elevator controls..."
	assign_sound(SFX_8116, CHANNEL_6)
	set_object_sound_playing(CHANNEL_6, 0x01, TRUE)
	restart_timer

	beginloop(0x22)
		if_timer_gt(15, /*goto*/ 0x00)
	endloop(0x22)

	label(0x00)
	mute_channel(CHANNEL_6)

	beginloop(0x23)
		if_timer_gt(40, /*goto*/ 0x00)
	endloop(0x23)

	label(0x00)

	beginloop(0x24)
		if_timer_gt(60, /*goto*/ 0x00)
	endloop(0x24)

	label(0x00)

	beginloop(0x25)
		if_timer_gt(80, /*goto*/ 0x00)
	endloop(0x25)

	label(0x00)
	restart_timer

	beginloop(0x21)
		if_timer_gt(120, /*goto*/ 0x00)
	endloop(0x21)

	label(0x00)
	play_sound(SFX_DOOR_81B0, -1)
	unlock_door(0x02, 0x01)
	unlock_door(0x03, 0x01)
	show_hudmsg(CHR_TARGET, L_ARK_034) // "Office elevator door has been unlocked."
	set_stage_flag(STAGEFLAG_ELEVATOR_UNLOCKED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1005_check_bodyguards_dead[] = {
	#define if_alive_goto_00(chr, goto) \
		if_chr_death_animation_finished(chr, goto) \
		if_chr_dead(chr, goto) \
		if_chr_knockedout(chr, goto) \
		goto_next(0x00) \
		label(goto)

	beginloop(0x1f)
		if_alive_goto_00(CHR_TOPGUARD5, 0x21)
		if_alive_goto_00(CHR_TOPGUARD4, 0x22)
		if_alive_goto_00(CHR_TOPGUARD3, 0x23)
		if_alive_goto_00(CHR_TOPGUARD2, 0x24)
		if_alive_goto_00(CHR_TOPGUARD1, 0x20)

		set_stage_flag(STAGEFLAG_TOP_BODYGUARDS_DEAD)
		unlock_door(OBJ_TOPROOMDOOR, 0x02)
		unset_object_flag2(OBJ_TOPROOMDOOR, OBJFLAG2_AICANNOTUSE)
		if_difficulty_lt(DIFF_SA, /*goto*/ 0x26)

		if_alive_goto_00(0x16, 0x20)
		if_alive_goto_00(0x17, 0x20)
		if_alive_goto_00(0x18, 0x20)
		if_alive_goto_00(0x19, 0x20)
		if_alive_goto_00(0x1a, 0x20)

		if_chr_death_animation_finished(0x1b, /*goto*/ 0x20)
		if_chr_dead(0x1b, /*goto*/ 0x20)
		if_chr_knockedout(0x1b, /*goto*/ 0x20)
		goto_next(0x00)

		label(0x00)
	endloop(0x1f)

	label(0x20)
	label(0x26)
	show_hudmsg(CHR_BOND, L_ARK_036) // "Cassandra's bodyguards have been defeated."
	set_stage_flag(STAGEFLAG_OBJECTIVE_BODYGUARDS_DEAD)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1006_check_hovercopter_destroyed[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x26)

	beginloop(0x1f)
		if_object_in_good_condition(OBJ_HOVERCOPTER, /*goto*/ 0x00)
		show_hudmsg(CHR_BOND, L_ARK_035) // "DataDyne Hovercopter eliminated."
		set_stage_flag(STAGEFLAG_HOVERCOPTER_DESTROYED)
		set_ailist(CHR_SELF, GAILIST_IDLE)
		label(0x00)
	endloop(0x1f)

	label(0x26)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100e_drcaroll_warnings[] = {
	beginloop(0x1f)
		if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x21)
		if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x21)
		if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x21)
		if_stage_flag_eq(STAGEFLAG_DRCAROLL_ATTACKED, TRUE, /*goto*/ 0x00)
		if_chr_shield_lt(CHR_DRCAROLL, 100, /*goto*/ 0x30)

		// Attacked message already shown
		label(0x00)
		if_stage_flag_eq(STAGEFLAG_DRCAROLL_DAMAGED, TRUE, /*goto*/ 0x00)
		if_just_injured(CHR_DRCAROLL, /*goto*/ 0x31)

		label(0x00)
		if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x00)
		if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x00)
		if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x00)
		reloop(0x1f)

		// Dead
		label(0x21)
		label(0x00)
		show_hudmsg(CHR_BOND, L_ARK_016) // "Dr. Caroll has been killed!"
		set_stage_flag(STAGEFLAG_DRCAROLL_DEAD)
		set_ailist(CHR_SELF, GAILIST_IDLE)

		// Shield under 100
		label(0x30)
		show_hudmsg(CHR_BOND, L_ARK_017) // "Dr. Caroll is under attack!"
		set_stage_flag(STAGEFLAG_DRCAROLL_ATTACKED)
		reloop(0x1f)

		label(0x31)
		show_hudmsg(CHR_BOND, L_ARK_018) // "Dr. Caroll has been damaged!"
		set_stage_flag(STAGEFLAG_DRCAROLL_DAMAGED)
	endloop(0x1f)

	endlist
};

u8 func1007_noop[] = {
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1008_trigger_hovercopter_roof[] = {
	// Wait until techs running, then wait 7 seconds, then set flag that allows
	// the hovercopter to go to the roof.
	beginloop(0x1f)
		if_timer_gt(420, /*goto*/ 0x21)
		if_timer_gt(0, /*goto*/ 0x20)
		if_stage_flag_eq(STAGEFLAG_TECHS_RUNNING, TRUE, /*goto*/ 0x00)
		label(0x20)
		reloop(0x1f)

		label(0x00)
		restart_timer
	endloop(0x1f)

	label(0x21)
	set_stage_flag(STAGEFLAG_CHOPPER_GO_TO_ROOF)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1009_init_top_room[] = {
	set_chr_chrflag(CHR_TOPGUARD1, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_TOPGUARD2, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_TOPGUARD3, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_TOPGUARD4, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_TOPGUARD5, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_CASS, CHRCFLAG_INVINCIBLE)

	beginloop(0x1f)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x0039, /*goto*/ 0x00)
		if_chr_activated_object(CHR_P1P2, OBJ_TOPROOMDOOR, /*goto*/ 0x00)
	endloop(0x1f)

	label(0x00)
	set_object_flag(OBJ_TOPROOMDOOR, OBJFLAG_CANNOT_ACTIVATE)
	set_chr_target_chr(CHR_CASS, CHR_P1P2)
	set_chr_target_chr(CHR_TOPGUARD1, CHR_P1P2)
	set_chr_target_chr(CHR_TOPGUARD2, CHR_P1P2)
	set_chr_target_chr(CHR_TOPGUARD3, CHR_P1P2)
	set_chr_target_chr(CHR_TOPGUARD4, CHR_P1P2)
	set_chr_target_chr(CHR_TOPGUARD5, CHR_P1P2)
	unset_chr_chrflag(CHR_TOPGUARD1, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_TOPGUARD2, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_TOPGUARD3, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_TOPGUARD4, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_TOPGUARD5, CHRCFLAG_INVINCIBLE)
	set_chr_team(CHR_CASS, TEAM_ENEMY)
	set_chr_team(CHR_TOPGUARD1, TEAM_ENEMY)
	set_chr_team(CHR_TOPGUARD2, TEAM_ENEMY)
	set_chr_team(CHR_TOPGUARD3, TEAM_ENEMY)
	set_chr_team(CHR_TOPGUARD4, TEAM_ENEMY)
	set_chr_team(CHR_TOPGUARD5, TEAM_ENEMY)
	set_stage_flag(STAGEFLAG_ENTERING_TOP_ROOM)
	restart_timer

	beginloop(0x21)
		if_timer_gt(60, /*goto*/ 0x00)
	endloop(0x21)

	label(0x00)
	beginloop(0x21)
		if_chr_shield_lt(CHR_CASS, 100, /*goto*/ 0x20)
	endloop(0x21)

	label(0x20)
	set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040b_init_tech1[] = {
	set_chr_maxdamage(CHR_SELF, 1)
	set_ailist(CHR_SELF, 0x0409)
	endlist
};

u8 func0409_tech_conversation[] = {
	set_shotlist(GAILIST_IDLE)

	beginloop(0x01)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_chr_activated_object(CHR_TARGET, 0x11, /*goto*/ 0x00)
		if_door_state(0x11, DOORSTATE_OPEN, /*goto*/ 0x00)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		dprint 'T','E','C','H',' ','1',' ','L','O','O','P','\n',0,
		set_chr_chrflag(CHR_TECH1, CHRCFLAG_INVINCIBLE)
		set_chr_chrflag(CHR_TECH2, CHRCFLAG_INVINCIBLE)
		set_chr_chrflag(CHR_RLSHOCK, CHRCFLAG_INVINCIBLE)
	endloop(0x01)

	// Player activated door or door is fully open
	label(0x00)
	set_chrpreset(CHR_TARGET)
	set_chr_team(CHR_TECH1, TEAM_ENEMY)
	set_chr_team(CHR_TECH2, TEAM_ENEMY)
	set_chr_team(CHR_RLSHOCK, TEAM_ENEMY)
	rebuild_teams
	rebuild_squadrons
	unset_chr_chrflag(CHR_TECH1, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_TECH2, CHRCFLAG_INVINCIBLE)
	unset_chr_chrflag(CHR_RLSHOCK, CHRCFLAG_INVINCIBLE)
	set_ailist(CHR_RLSHOCK, GAILIST_UNALERTED)
	restart_timer
	chr_do_animation(ANIM_OPERATE_0204, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, 0x10, 2)

	beginloop(0x28)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		if_timer_gt(30, /*goto*/ 0x20)
	endloop(0x28)

	label(0x20)
	dprint 'T','E','C','H',' ','2',' ','L','O','O','P','\n',0,
	chr_do_animation(ANIM_TALKING_00A0, 0, -1, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)
	speak(CHR_PRESET, L_ARK_037, SFX_811D, CHANNEL_7, COLOR_06_WHITE) // "That's not how it goes."
	restart_timer

	beginloop(0x21)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_can_see_target(/*goto*/ 0x33)
		pause_timer
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
		reloop(0x21)

		label(0x20)
		resume_timer
		if_timer_gt(20, /*goto*/ 0x20)
	goto_first(0x21)

	label(0x20)
	chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)
	chr_do_animation(ANIM_TALKING_00A0, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, 0x10, 2)
	speak(CHR_PRESET, L_ARK_038, SFX_8120, CHANNEL_7, COLOR_08_RED) // "Yes, it is."

	beginloop(0x22)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_can_see_target(/*goto*/ 0x33)
		pause_timer
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
		reloop(0x22)

		label(0x20)
		resume_timer
		if_timer_gt(40, /*goto*/ 0x20)
	endloop(0x22)

	label(0x20)
	chr_do_animation(ANIM_TALKING_00A0, 0, -1, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)
	chr_do_animation(ANIM_OPERATE_0205, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, 0x10, 2)
	speak(CHR_PRESET, L_ARK_039, SFX_811E, CHANNEL_7, COLOR_06_WHITE) // "Give it to me - you're doing it wrong."

	beginloop(0x23)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_can_see_target(/*goto*/ 0x33)
		pause_timer
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
		reloop(0x23)

		label(0x20)
		resume_timer
		if_timer_gt(60, /*goto*/ 0x20)
	endloop(0x23)

	label(0x20)
	chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)
	chr_do_animation(ANIM_TALKING_00A0, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, 0x10, 2)
	speak(CHR_PRESET, L_ARK_040, SFX_8121, CHANNEL_7, COLOR_08_RED) // "Stop annoying me."

	beginloop(0x24)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_can_see_target(/*goto*/ 0x33)
		pause_timer
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
		reloop(0x24)

		label(0x20)
		resume_timer
		if_timer_gt(80, /*goto*/ 0x20)
	endloop(0x24)

	label(0x20)
	chr_do_animation(ANIM_TWO_GUN_HOLD, 0, -1, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)
	chr_do_animation(ANIM_TALKING_00A0, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, CHR_RLSHOCK, 2)
	chr_do_animation(ANIM_OPERATE_0206, -1, -1, CHRANIMFLAG_MOVEWHENINVIS, 20, 0x10, 2)
	speak(CHR_PRESET, L_ARK_041, SFX_8123, CHANNEL_7, COLOR_09_BLUE) // "Will you just hurry up!"

	beginloop(0x25)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_can_see_target(/*goto*/ 0x33)
		pause_timer
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
		reloop(0x25)

		label(0x20)
		resume_timer
		if_timer_gt(100, /*goto*/ 0x20)
	endloop(0x25)

	label(0x20)
	set_stage_flag(STAGEFLAG_TECHS_FINISHED)
	stop_chr

	beginloop(0x26)
		if_saw_injury(0x00, /*goto*/ 0x33)
		if_saw_death(0x00, /*goto*/ 0x33)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
		if_los_to_target(/*goto*/ 0x20)
	endloop(0x26)

	label(0x20)
	label(0x33)
	dprint 'C','H','O','P','P','E','R',' ','C','A','N',' ','G','O','\n',0,
	if_stage_flag_eq(STAGEFLAG_TECHS_RUNNING, TRUE, /*goto*/ 0x00)
	set_stage_flag(STAGEFLAG_TECHS_RUNNING)
	label(0x00)
	increase_squadron_alertness(100)
	open_door(0x04)
	restart_timer
	speak(CHR_TARGET, L_ARK_042, SFX_811F, CHANNEL_7, COLOR_06_WHITE) // "Oh, no...too late."
	chr_do_animation(ANIM_SURRENDER_002E, 0, 193, CHRANIMFLAG_COMPLETED | CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x34)
		if_timer_gt(60, /*goto*/ 0x35)
	endloop(0x34)

	label(0x35)
	jog_to_pad(PAD_ARK_01CD)

	beginloop(0x36)
		if_chr_stopped(/*goto*/ 0x37)
	endloop(0x36)

	label(0x37)
	restart_timer
	surrender
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Unreachable
	chr_do_animation(ANIM_COWER_0229, -1, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x38)
		if_chr_idle(/*goto*/ 0x5e)
		goto_next(0x20)

		label(0x5e)
		reloop(0x38)

		label(0x20)
		restart_timer
	endloop(0x38)

	label(0x00)
	remove_chr(CHR_SELF)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040d_cass_necklace[] = {
	chr_toggle_modelpart(CHR_CASS, MODELPART_CHR_NECKLACE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040c_init_tech2[] = {
	set_chr_maxdamage(CHR_SELF, 1)
	set_ailist(CHR_SELF, 0x040a)
	endlist
};

u8 func040a_tech2[] = {
	set_shotlist(GAILIST_IDLE)
	stop_chr

	beginloop(0x1f)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_stage_flag_eq(STAGEFLAG_TECHS_FINISHED, TRUE, /*goto*/ 0x20)
		if_can_see_target(/*goto*/ 0x33)
		if_alertness(99, OPERATOR_GREATER_THAN, /*goto*/ 0x33)
	endloop(0x1f)

	label(0x20)
	stop_chr

	beginloop(0x21)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x00)
		reloop(0x21)

		label(0x00)
		label(0x33)
		dprint 'C','H','O','P','P','E','R',' ','C','A','N',' ','G','O','\n',0,
		if_stage_flag_eq(STAGEFLAG_TECHS_RUNNING, TRUE, /*goto*/ 0x00)
		set_stage_flag(STAGEFLAG_TECHS_RUNNING)
		label(0x00)
		increase_squadron_alertness(100)
		open_door(0x04)
		yield
		restart_timer
		chr_do_animation(ANIM_OPERATE_0205, 0, -1, CHRANIMFLAG_COMPLETED | CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2)

		// @bug: Duplicate label. I suspect the goto first 0x21 below is
		// supposed to go here. The only possible side effect is the tech may
		// restart his animation repeatedly.
		label(0x21)
		yield
		if_sound_finished(CHANNEL_7, /*goto*/ 0x20)
	endloop(0x21)

	label(0x20)
	chr_do_animation(ANIM_SURRENDER_002E, 0, -1, CHRANIMFLAG_COMPLETED | CHRANIMFLAG_SLOWUPDATE, 10, CHR_SELF, 2)
	speak(CHR_TARGET, L_ARK_043, SFX_8122, CHANNEL_7, COLOR_08_RED) // "She's here..."

	beginloop(0x22)
		if_sound_finished(CHANNEL_7, /*goto*/ 0x35)
	endloop(0x22)

	label(0x35)
	jog_to_pad(PAD_ARK_002A)

	beginloop(0x36)
		if_chr_stopped(/*goto*/ 0x37)
	endloop(0x36)

	label(0x37)
	restart_timer
	surrender
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Unreachable
	chr_do_animation(ANIM_COWER_0229, -1, -1, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x38)
		if_chr_idle(/*goto*/ 0x5e)
		goto_next(0x20)

		label(0x5e)
		reloop(0x38)

		label(0x20)
		restart_timer
	endloop(0x38)

	label(0x00)
	remove_chr(CHR_SELF)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040d_cass[] = {
	set_shield(100)
	set_self_chrflag(CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_CASS, CHRCFLAG_UNEXPLODABLE)
	set_target_chr(CHR_P1P2)

	beginloop(0x3b)
		if_stage_flag_eq(STAGEFLAG_ENTERING_TOP_ROOM, TRUE, /*goto*/ 0x3a)
	endloop(0x3b)

	label(0x3a)
	open_door(OBJ_TOPROOMDOOR)
	set_target_chr(CHR_PRESET)
	if_num_human_players_lt(2, /*goto*/ 0x20)
	goto_next(0x89)

	// 1 player - do force walk (enter room)
	label(0x20)
	revoke_control(CHR_BOND, 0)
	force_walk(CHR_BOND, 0x0019, 40, 55, 0, 46)

	beginloop(0x23)
		open_door(OBJ_TOPROOMDOOR)
		if_force_walk_finished(CHR_BOND, /*goto*/ 0x24)
	endloop(0x23)

	// Second force walk (turn to face Cass)
	label(0x24)
	force_walk(CHR_BOND, 0x0018, 0, 65, 65, 0)
	open_door(OBJ_TOPROOMDOOR)

	beginloop(0x25)
		if_force_walk_finished(CHR_BOND, /*goto*/ 0x26)
	endloop(0x25)

	label(0x26)
	unset_object_flag(OBJ_TOPROOMDOOR, OBJFLAG_CANNOT_ACTIVATE)
	grant_control(CHR_BOND)
	close_door(OBJ_TOPROOMDOOR)
	if_chr_in_room(CHR_BOND, 0x00, 0x0045, /*goto*/ 0x20)
	lock_door(OBJ_TOPROOMDOOR, 0x02)

	// 2 players, or force walk failed
	label(0x20)
	if_chr_death_animation_finished(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_dead(CHR_DRCAROLL, /*goto*/ 0x20)
	if_chr_knockedout(CHR_DRCAROLL, /*goto*/ 0x20)
	set_ailist(CHR_DRCAROLL, 0x0405)
	label(0x20)
	goto_next(0x00)

	label(0x89)
	unset_object_flag(OBJ_TOPROOMDOOR, OBJFLAG_CANNOT_ACTIVATE)
	restart_timer

	beginloop(0x8a)
		if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x5b)
		if_timer_gt(120, /*goto*/ 0x00)
	endloop(0x8a)

	label(0x00)
	restart_timer
	speak(CHR_TARGET, L_ARK_032, SFX_80FF, CHANNEL_6, COLOR_04_ORANGE) // "We meet again, girl!"
	chr_do_animation(ANIM_TALKING_00A0, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x27)
		if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x5b)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x00)
	endloop(0x27)

	label(0x00)
	restart_timer
	speak(CHR_TARGET, L_ARK_020, SFX_80FE, CHANNEL_6, COLOR_04_ORANGE) // "You've become quite an annoyance..."
	chr_do_animation(ANIM_TALKING_00A3, 0, 193, CHRANIMFLAG_SLOWUPDATE, 20, CHR_SELF, 2)

	beginloop(0x28)
		if_stage_flag_eq(STAGEFLAG_CASS_SHIELD_DAMAGED, TRUE, /*goto*/ 0x5b)
		if_timer_gt(300, /*goto*/ 0x00)
	endloop(0x28)

	label(0x5b)
	restart_timer

	beginloop(0x29)
		if_timer_gt(60, /*goto*/ 0x20)
	endloop(0x29)

	label(0x20)
	speak(CHR_TARGET, L_ARK_044, SFX_8101, CHANNEL_6, COLOR_04_ORANGE) // "Get her!"
	chr_do_animation(ANIM_TALKING_00A3, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)
	goto_next(0x20)

	label(0x00)
	restart_timer
	speak(CHR_TARGET, L_ARK_021, SFX_8100, CHANNEL_6, COLOR_04_ORANGE) // "Good night, Ms. Dark."
	chr_do_animation(ANIM_TALKING_00A0, 0, 193, CHRANIMFLAG_SLOWUPDATE, 16, CHR_SELF, 2)

	beginloop(0x2a)
		if_timer_gt(150, /*goto*/ 0x20)
	endloop(0x2a)

	label(0x20)
	set_lights_state(0x0044, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x0039, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003c, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003d, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003e, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003b, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x0042, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003f, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x003a, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x0041, LIGHTOP_TURNOFF, 0, 0, 0)
	set_lights_state(0x0040, LIGHTOP_TURNOFF, 0, 0, 0)
	set_stage_flag(STAGEFLAG_TOP_LIGHTS_OFF)
	set_stage_flag(STAGEFLAG_TOP_GUARDS_ATTACKING)
	walk_to_pad(PAD_ARK_000F)
	restart_timer

	beginloop(0x2b)
		if_timer_gt(60, /*goto*/ 0x00)
	endloop(0x2b)

	label(0x00)
	play_sound(SFX_8102, CHANNEL_7)

	beginloop(0x2c)
		if_timer_gt(120, /*goto*/ 0x00)
	endloop(0x2c)

	label(0x00)
	play_x_track(XREASON_DEFAULT, 10, 60)

	beginloop(0x3f)
		if_timer_gt(180, /*goto*/ 0x00)
	endloop(0x3f)

	label(0x00)
	set_stage_flag(STAGEFLAG_TRIGGER_CANTLEAVEANY_MSG)
	label(0x3d)
	label(0x00)
	label(0x00)
	set_stage_flag(STAGEFLAG_TOP_GUARDS_ATTACKING)

	// Wait until Cass not in top room
#if VERSION >= VERSION_NTSC_1_0
	beginloop(0x2c)
		if_chr_in_room(CHR_SELF, 0x00, 0x003a, /*goto*/ 0x20)
		if_chr_in_room(CHR_SELF, 0x00, 0x003b, /*goto*/ 0x20)
		goto_next(0x00)

		label(0x20)
		reloop(0x2c)

		// And not in sight
		label(0x00)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_nearly_in_targets_sight(30, /*goto*/ 0x20)
		set_target_chr(CHR_ANTI)
		if_nearly_in_targets_sight(30, /*goto*/ 0x20)
		goto_next(0x2d)

		label(0x20)
	endloop(0x2c)
#else
	beginloop(0x2c)
		if_los_to_target(/*goto*/ 0x20)
		goto_next(0x2d)

		label(0x20)
	endloop(0x2c)
#endif

	label(0x2d)
	set_chr_hiddenflag(CHR_CASS, CHRHFLAG_WARPONSCREEN)
	chr_toggle_modelpart(CHR_CASS, MODELPART_CHR_NECKLACE)
	chr_move_to_pad(CHR_CASS, PAD_ARK_0205, FALSE, /*goto*/ 0x00)
	dprint 'M','O','V','E',' ','F','A','I','L','\n',0,
	label(0x00)
	dprint 'M','O','V','E',' ','G','O','O','D','\n',0,
#if VERSION >= VERSION_NTSC_1_0
	try_face_entity(ATTACKFLAG_AIMATTARGET, 0, /*goto*/ 0x20)
	label(0x20)
#else
	stop_chr
#endif
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101f_unlock_top_door[] = {
	beginloop(0x1f)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_in_room(CHR_P1P2, 0x00, 0x003b, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	unlock_door(OBJ_TOPROOMDOOR, 0x02)
	unset_object_flag2(OBJ_TOPROOMDOOR, OBJFLAG2_AICANNOTUSE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

/**
 * @unused
 */
u8 func040e_noop2[] = {
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100a_lightswitch[] = {
	beginloop(0x1f)
		if_chr_activated_object(CHR_ANY, OBJ_LIGHTSWITCH, /*goto*/ 0x20)
		reloop(0x1f)

		label(0x20)
		play_sound(SFX_PRESS_SWITCH, -1)
		if_stage_flag_eq(STAGEFLAG_TOP_LIGHTS_OFF, TRUE, /*goto*/ 0x00)
		set_lights_state(0x0044, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x0039, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003c, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003d, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003e, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003b, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x0042, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003f, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x003a, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x0041, LIGHTOP_TURNOFF, 0, 0, 0)
		set_lights_state(0x0040, LIGHTOP_TURNOFF, 0, 0, 0)
		set_stage_flag(STAGEFLAG_TOP_LIGHTS_OFF)
		reloop(0x1f)

		label(0x00)
		unset_stage_flag(STAGEFLAG_TOP_LIGHTS_OFF)
		set_lights_state(0x0044, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x0039, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003c, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003d, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003e, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003b, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x0042, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003f, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x003a, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x0041, LIGHTOP_TURNON, 0, 0, 0)
		set_lights_state(0x0040, LIGHTOP_TURNON, 0, 0, 0)
	endloop(0x1f)

	endlist
};

u8 func100b_check_top_lights_on[] = {
	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_TOP_GUARDS_ATTACKING, TRUE, /*goto*/ 0x00)
		endloop(0x1f)

		label(0x00)
		if_stage_flag_eq(STAGEFLAG_TOP_LIGHTS_OFF, TRUE, /*goto*/ 0x00)
		goto_next(0x20)

		label(0x00)
	endloop(0x1f)

	label(0x20)
	set_stage_flag(STAGEFLAG_CASS_SHIELD_DAMAGED)
	set_ailist(CHR_TOPGUARD1, AILIST_TOP_GUARD_BLINDED)
	set_ailist(CHR_TOPGUARD2, AILIST_TOP_GUARD_BLINDED)
	set_ailist(CHR_TOPGUARD3, AILIST_TOP_GUARD_BLINDED)
	set_ailist(CHR_TOPGUARD4, AILIST_TOP_GUARD_BLINDED)
	set_ailist(CHR_TOPGUARD5, AILIST_TOP_GUARD_BLINDED)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func100c_foyer_lights[] = {
	restart_timer
	beginloop(0x21)
		if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_OFF, TRUE, /*goto*/ 0x00)
		if_timer_gt(980, /*goto*/ 0x00)
	endloop(0x21)

	label(0x00)
	set_lights_state(0x0019, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001a, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001b, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001c, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001d, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001e, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x001f, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0020, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0021, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0017, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0018, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0016, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0022, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0023, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0024, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0025, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0026, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0027, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0028, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0029, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002a, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002b, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002c, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002d, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002e, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x002f, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0030, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0031, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0032, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0033, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0034, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0035, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0036, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x0015, LIGHTOP_TRANSITION, 100, 2, 120)
	set_lights_state(0x000f, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x000e, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x0010, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x0011, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x0012, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x0013, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x0014, LIGHTOP_TRANSITION, 100, 2, 240)
	set_lights_state(0x000d, LIGHTOP_TRANSITION, 100, 2, 240)
	restart_timer

	beginloop(0x22)
		if_timer_gt(240, /*goto*/ 0x00)
	endloop(0x22)

	label(0x00)
	set_lights_state(0x0019, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001a, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001b, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001c, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001d, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001e, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x001f, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0020, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0021, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0017, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0018, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0016, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0022, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0023, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0024, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0025, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0026, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0027, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0028, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0029, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002a, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002b, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002c, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002d, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002e, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x002f, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0030, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0031, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0032, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0033, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0034, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0035, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0036, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0015, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x000f, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x000e, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0010, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0011, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0012, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0013, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x0014, LIGHTOP_SET, 2, 0, 0)
	set_lights_state(0x000d, LIGHTOP_SET, 2, 0, 0)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1400_setup_counterop[] = {
	yield
	set_chr_team(CHR_ANTI, TEAM_ENEMY)
	give_object_to_chr(OBJ_NIGHTVISION, CHR_BOND)
	give_object_to_chr(OBJ_NIGHTVISION, CHR_COOP)
	set_ailist(CHR_SELF, GAILIST_REBUILD_GROUPS)
	endlist
};

u8 func100d_intro[] = {
	play_cutscene_track(MUSIC_EXTRACTION_INTRO)
	camera_movement(ANIM_CUT_ARK_INTRO_CAM)
	cmd0175(60)
	set_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_INTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 4)
	set_chr_chrflag(0x00, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(0x00, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_INTRO_DRC, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_DRCAROLL, 4)
	set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_INTRO_GUARD_01, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_GUARD, 4)
	unset_stage_flag(STAGEFLAG_00800000)
	restart_timer
	fade_to_color(0x000000ff, 0)
	fade_to_color(0x00000000, 110)
	yield
	set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE)
	yield
	set_cutscene_weapon(CHR_BOND, WEAPON_FALCON2_SCOPE, WEAPON_NONE)
	if_controller_button_pressed(/*goto*/ 0x00)

	#define wait_until(time, loopid) \
		beginloop(loopid) \
			if_controller_button_pressed(/*goto*/ 0x5d) \
			if_timer_gt(time, /*goto*/ 0x00) \
		endloop(loopid) \
		label(0x00)

	wait_until(20, 0x61)
	open_door(0x0c)

	wait_until(120, 0x60)
	play_sound(SFX_0161, -1)

	wait_until(350, 0x62)
	play_sound(SFX_042F, -1)

	wait_until(450, 0x63)
	play_sound(SFX_0427, -1)

	wait_until(540, 0x64)
	speak(CHR_BOND, L_ARK_060, MP3_03F3, CHANNEL_7, COLOR_06_WHITE) // "Sound the alarm - she's here!"

	wait_until(640, 0x65)
	speak(CHR_BOND, L_ARK_061, MP3_03F4, CHANNEL_7, COLOR_09_BLUE) // "Lights out!"

	wait_until(690, 0x66)
	play_sound(SFX_0428, -1)

	wait_until(720, 0x67)
	play_sound(SFX_ARGH_DRCAROLL_0250, 10)

	wait_until(850, 0x68)
	play_sound(SFX_0430, -1)

	wait_until(880, 0x69)
	play_sound(SFX_0429, -1)

	wait_until(890, 0x6a)
	close_door(0x0c)

	wait_until(1000, 0x6b)
	speak(CHR_BOND, L_ARK_062, MP3_03F5, CHANNEL_7, COLOR_09_BLUE) // "What the...?"

	beginloop(0x21)
		if_camera_animating(/*goto*/ 0x20)
		goto_next(0x5d)

		label(0x20)
	endloop(0x21)

	label(0x5d)
	set_stage_flag(STAGEFLAG_FOYER_LIGHTS_OFF)
	mute_channel(CHANNEL_CUTSCENE)
	mute_channel(CHANNEL_7)

	unset_chr_chrflag(CHR_COOP, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	unset_chr_chrflag(CHR_BOND, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_BOND, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_INTRO_JO, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_BOND, 2)

	unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE)
	set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_INTRO_DRC, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_DRCAROLL, 2)

	unset_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_UNPLAYABLE)
	set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_INVINCIBLE)
	set_chr_hiddenflag(CHR_INTRO_GUARD, CHRHFLAG_00020000)
	set_chr_chrflag(CHR_INTRO_GUARD, CHRCFLAG_PERIMDISABLEDTMP)
	chr_do_animation(ANIM_CUT_ARK_INTRO_GUARD_01, -2, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_GUARD, 2)

	stop_cutscene_track
	stop_ambient_track
	enter_firstperson
	yield
	chr_do_animation(ANIM_CUT_ARK_INTRO_GUARD_02, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_INTRO_GUARD, 2)
	set_ailist(CHR_DRCAROLL, 0x0402)
	yield
	kill(CHR_INTRO_GUARD)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0412_outro[] = {
	play_cutscene_track(MUSIC_EXTRACTION_OUTRO)
	play_temporary_track(MUSIC_EXTRACTION_OUTRO_SFX)
	camera_movement(ANIM_CUT_ARK_OUTRO_CAM)
	set_object_flag2(OBJ_HOVERCOPTER, OBJFLAG2_INVISIBLE)
	disable_object(OBJ_HOVERCOPTER)
	set_ailist(CHR_P1P2, GAILIST_IDLE)
	set_chr_chrflag(CHR_ANTI, CHRCFLAG_HIDDEN)
	set_chr_chrflag(CHR_P1P2_OPPOSITE, CHRCFLAG_HIDDEN)
	dprint 'c','u','t',' ','s','c','e','n','e',' ','2',0,
	set_chr_chrflag(CHR_P1P2, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_CASS, CHRCFLAG_INVINCIBLE)
	chr_toggle_modelpart(CHR_CASS, MODELPART_CHR_NECKLACE)
	set_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_OUTRO_GUARD1, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_INVINCIBLE)
	set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_INVINCIBLE)

	set_ailist(CHR_DRCAROLL, GAILIST_IDLE)
	set_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_DRCAROLL, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_DRCAROLL, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_DRC, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_DRCAROLL, 4)

	set_ailist(CHR_CASS, AILIST_CASS_OUTRO)
	set_chr_chrflag(CHR_CASS, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_CASS, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_CASS, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_CASS, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_CASS, 4)

	set_ailist(CHR_MRBLONDE, GAILIST_IDLE)
	set_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_MRBLONDE, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_MRBLONDE, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_MRB, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_MRBLONDE, 4)

	set_ailist(CHR_OUTRO_GUARD1, GAILIST_IDLE)
	set_chr_chrflag(CHR_OUTRO_GUARD1, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_OUTRO_GUARD1, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_OUTRO_GUARD1, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_GUARD1, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_OUTRO_GUARD1, 4)

	set_ailist(CHR_OUTRO_GUARD2, GAILIST_IDLE)
	set_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_OUTRO_GUARD2, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_OUTRO_GUARD2, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_GUARD2, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_OUTRO_GUARD2, 4)

	enable_object(OBJ_JUMPSHIP)
	set_object_flag3(OBJ_JUMPSHIP, OBJFLAG3_00000010)
	set_object_flag2(OBJ_JUMPSHIP, OBJFLAG2_CANFILLVIEWPORT)
	object_do_animation(ANIM_CUT_ARK_OUTRO_DROPSHIP, OBJ_JUMPSHIP, 0x04, 0xffff)
	set_ailist(CHR_P1P2, GAILIST_IDLE)
	set_chr_chrflag(CHR_P1P2, CHRCFLAG_UNPLAYABLE)
#if VERSION >= VERSION_NTSC_1_0
	unset_chr_chrflag(CHR_P1P2, CHRCFLAG_HIDDEN)
#endif
	set_chr_hiddenflag(CHR_P1P2, CHRHFLAG_00020000)
	chr_do_animation(ANIM_CUT_ARK_OUTRO_JO, -1, -1, CHRANIMFLAG_MOVEWHENINVIS | CHRANIMFLAG_PAUSEATEND, 0, CHR_P1P2, 4)
	show_nonessential_chrs(FALSE)
	restart_timer
	set_cutscene_weapon(CHR_P1P2, -1, -1)
	yield
	set_cutscene_weapon(CHR_P1P2, -1, WEAPON_FALCON2_SCOPE)

	#define outro_wait_until(time, loopid) \
		beginloop(loopid) \
			if_controller_button_pressed(/*goto*/ 0x5d) \
			if_timer_gt(time, /*goto*/ 0x00) \
		endloop(loopid) \
		label(0x00)

	outro_wait_until(0, 0x5f)
	outro_wait_until(20, 0x5f)
	outro_wait_until(47, 0x7e)
	outro_wait_until(90, 0x7f)

	outro_wait_until(120, 0x60)
	speak(CHR_P1P2, L_ARK_063, MP3_03F6, CHANNEL_7, COLOR_04_ORANGE) // "Going somewhere?"

	outro_wait_until(188, 0x61)
	play_sound(SFX_01D9, -1)

	outro_wait_until(350, 0x62)
	speak(CHR_P1P2, L_ARK_064, MP3_03F7, CHANNEL_7, COLOR_09_BLUE) // "Something I can do for you, old woman?"

	outro_wait_until(500, 0x63)
	speak(CHR_P1P2, L_ARK_065, MP3_03F8, CHANNEL_7, COLOR_04_ORANGE) // "Return our sapient immediately! You don't know wha..."

	outro_wait_until(720, 0x64)
	play_sound(SFX_0424, -1)

	outro_wait_until(740, 0x65)
	speak(CHR_P1P2, L_ARK_066, MP3_03F9, CHANNEL_7, COLOR_09_BLUE) // "Yes I do. I'm leaving."

	outro_wait_until(858, 0x73)

	outro_wait_until(980, 0x66)
	speak(CHR_P1P2, L_ARK_067, MP3_03FA, CHANNEL_7, COLOR_04_ORANGE) // "One more chance! Give it back, and you could come ..."

	outro_wait_until(990, 0x68)
	play_sound(SFX_RELOAD_DEFAULT, -1)

	outro_wait_until(1220, 0x69)

	outro_wait_until(1240, 0x6a)

	outro_wait_until(1348, 0x6b)
	play_sound(SFX_FOOTSTEP_80C8, -1)

	outro_wait_until(1380, 0x80)
	play_sound(SFX_FOOTSTEP_80C9, -1)

	outro_wait_until(1400, 0x81)
	set_chr_shooting_in_cutscene(CHR_OUTRO_GUARD1, TRUE)

	yield
	yield
	set_chr_shooting_in_cutscene(CHR_OUTRO_GUARD1, FALSE)

	outro_wait_until(1420, 0x82)
	set_chr_shooting_in_cutscene(CHR_OUTRO_GUARD2, TRUE)

	yield
	yield
	set_chr_shooting_in_cutscene(CHR_OUTRO_GUARD2, FALSE)

	outro_wait_until(1425, 0x6c)
	speak(CHR_P1P2, L_ARK_068, MP3_03FB, CHANNEL_7, COLOR_09_BLUE) // "Sorry! Gotta shoot."

	outro_wait_until(1447, 0x6d)
	play_sound(SFX_FOOTSTEP_80CA, -1)

	outro_wait_until(1486, 0x83)
	play_sound(SFX_FOOTSTEP_80CB, -1)

	outro_wait_until(1505, 0x6e)
	play_sound(SFX_FIRE_SHOTGUN, CHANNEL_CUTSCENE)

	outro_wait_until(1520, 0x6f)
	play_sound(SFX_FIRE_SHOTGUN, CHANNEL_CUTSCENE)

	outro_wait_until(1526, 0x70)
	set_chr_shooting_in_cutscene(CHR_BOND, TRUE)

	yield
	yield
	set_chr_shooting_in_cutscene(CHR_BOND, FALSE)

	outro_wait_until(1538, 0x84)
	set_chr_shooting_in_cutscene(CHR_BOND, TRUE)

	yield
	yield
	set_chr_shooting_in_cutscene(CHR_BOND, FALSE)

	outro_wait_until(1554, 0x71)
	play_sound(SFX_ARGH_FEMALE_000D, CHANNEL_CUTSCENE)

	outro_wait_until(1600, 0x74)
	play_sound(SFX_ARGH_FEMALE_000E, CHANNEL_CUTSCENE)

	outro_wait_until(1734, 0x72)
	play_sound(SFX_THUD_808D, CHANNEL_CUTSCENE)

	outro_wait_until(1890, 0x75)
	play_sound(SFX_0425, -1)

	outro_wait_until(1940, 0x77)
	speak(CHR_P1P2, L_ARK_069, MP3_03FC, CHANNEL_7, COLOR_03_RED) // "You must get the sapient back. We cannot proceed w..."

	outro_wait_until(1944, 0x76)
	play_sound(SFX_FOOTSTEP_80C4, -1)

	outro_wait_until(1970, 0x85)
	play_sound(SFX_FOOTSTEP_80C5, -1)

	outro_wait_until(2008, 0x86)
	play_sound(SFX_FOOTSTEP_80C6, -1)

	outro_wait_until(2190, 0x78)
	speak(CHR_P1P2, L_ARK_070, MP3_03FD, CHANNEL_7, COLOR_04_ORANGE) // "I know that!"

	outro_wait_until(2300, 0x79)
	play_sound(SFX_FOOTSTEP_80C7, -1)

	outro_wait_until(2317, 0x87)
	play_sound(SFX_DISGUISE_ON, -1)

	outro_wait_until(2324, 0x88)
	play_sound(SFX_FOOTSTEP_80C4, -1)

	outro_wait_until(2340, 0x7a)
	play_sound(SFX_FOOTSTEP_80C7, -1)

	outro_wait_until(2344, 0x7b)

	outro_wait_until(2393, 0x7c)
	speak(CHR_P1P2, L_ARK_071, MP3_03FE, CHANNEL_7, COLOR_04_ORANGE) // "I also know who to talk to... Mr. Carrington."

	outro_wait_until(2497, 0x7d)

	beginloop(0x21)
		if_camera_animating(/*goto*/ 0x20)
		goto_next(0x5d)
		label(0x20)
		if_controller_button_pressed(/*goto*/ 0x5d)
	endloop(0x21)

	label(0x5d)
	disable_object(OBJ_JUMPSHIP)
	end_level
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func0413_defend_pad[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(12)
	set_reaction_speed(10)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	set_shotlist(AILIST_GENERAL_COMBAT)

	beginloop(0x1f)
		chr_toggle_p1p2(CHR_SELF)
		set_target_chr(CHR_P1P2)
		if_los_to_target(/*goto*/ 0x21)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x21)
		if_distance_from_target_to_pad_lt(200, PAD_PRESET, /*goto*/ 0x22)
	endloop(0x1f)

	label(0x21)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)

	label(0x22)
	go_to_target_pad(GOPOSFLAG_RUN)

	beginloop(0x23)
		if_chr_stopped(/*goto*/ 0x00)
		if_los_to_target(/*goto*/ 0x00)
		if_enemy_distance_lt_and_los(2540, /*goto*/ 0x00)
	endloop(0x23)

	label(0x00)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)
	endlist
};

u8 func100f_move_rocket_ammo[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x00)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	// Agent only
	label(0x00)
	move_object_to_pad(OBJ_ROCKETAMMO1, PAD_ARK_000F)
	move_object_to_pad(OBJ_ROCKETAMMO2, PAD_ARK_000D)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func040d_cass_outro[] = {
	set_shield(0)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1001_objectives_failed_msg[] = {
	yield
	set_chr_chrflag(CHR_TECH1, CHRCFLAG_KEEPCORPSEKO)
	set_chr_chrflag(CHR_TECH2, CHRCFLAG_KEEPCORPSEKO)
	set_ailist(CHR_SELF, GAILIST_SHOW_OBJ_FAILED_MSG)
	endlist
};

u8 func0414_init_shock[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(12)
	set_reaction_speed(10)
	set_chr_maxdamage(CHR_SELF, 40)
	add_health_or_armor(0)
	set_recovery_speed(10)
	set_shield(0)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)
	endlist
};

/**
 * @unused
 */
u8 func0415_init_10hp[] = {
	set_chr_dodge_rating(2, 10)
	set_accuracy(12)
	set_reaction_speed(10)
	set_chr_maxdamage(CHR_SELF, 10)
	add_health_or_armor(40)
	set_recovery_speed(0)
	set_shield(0)
	set_ailist(CHR_SELF, AILIST_GENERAL_COMBAT)
	endlist
};

u8 func1012_msg_lockeddown[] = {
	beginloop(0x1f)
		if_chr_in_room(CHR_BOND, 0x00, 0x0023, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	speak(CHR_BOND, L_ARK_051, SFX_8176, CHANNEL_6, COLOR_09_BLUE) // "They've locked down the ground floor - get to the ..."
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1013_msg_thatcopter[] = {
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x26)

	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_SAID_SURRENDER_OR_DIE, TRUE, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	restart_timer

	beginloop(0x21)
		if_timer_gt(300, /*goto*/ 0x20)
	endloop(0x21)

	label(0x20)
	speak(CHR_BOND, L_ARK_052, SFX_8177, CHANNEL_6, COLOR_09_BLUE) // "That copter needs to be taken out, or the jumpship..."

	label(0x26)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1014_msg_cantleaveany[] = {
	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_TRIGGER_CANTLEAVEANY_MSG, TRUE, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26)
	if_chr_dead(CHR_BOND, /*goto*/ 0x26)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x26)
	restart_timer

	beginloop(0x21)
		if_timer_gt(120, /*goto*/ 0x20)
	endloop(0x21)

	label(0x20)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x26)
	if_chr_dead(CHR_BOND, /*goto*/ 0x26)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x26)
	speak(CHR_BOND, L_ARK_053, MP3_03AA, CHANNEL_6, COLOR_09_BLUE) // "I can't leave any bodyguards standing."

	label(0x26)
	if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27)
	if_chr_dead(CHR_BOND, /*goto*/ 0x27)
	if_chr_knockedout(CHR_BOND, /*goto*/ 0x27)

	beginloop(0x5f)
		if_chr_death_animation_finished(CHR_BOND, /*goto*/ 0x27)
		if_chr_dead(CHR_BOND, /*goto*/ 0x27)
		if_chr_knockedout(CHR_BOND, /*goto*/ 0x27)
		if_sound_finished(CHANNEL_6, /*goto*/ 0x20)
	endloop(0x5f)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x27)
	mute_channel(CHANNEL_6)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1015_msg_jumpshipwaiting[] = {
	beginloop(0x1f)
		if_objective_failed(0, /*goto*/ 0x00)
		if_objective_failed(1, /*goto*/ 0x00)
		if_objective_failed(2, /*goto*/ 0x00)
		if_objective_failed(3, /*goto*/ 0x00)
		if_objective_failed(4, /*goto*/ 0x00)
		if_chr_in_room(CHR_BOND, 0x00, 0x0002, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	speak(CHR_BOND, L_ARK_054, SFX_8178, CHANNEL_6, COLOR_09_BLUE) // "Don't keep the jumpship waiting - get back to the ..."

	label(0x00)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1016_msg_make_foyer_guards_alerted[] = {
	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_ACCESSED_FOYER_ELEVATOR, TRUE, /*goto*/ 0x20)
	endloop(0x1f)

	#define if_alive_set_alerted(chr) \
		if_chr_death_animation_finished(chr, /*goto*/ 0x20) \
		if_chr_dead(chr, /*goto*/ 0x20) \
		if_chr_knockedout(chr, /*goto*/ 0x20) \
		set_ailist(chr, GAILIST_ALERTED) \
		increase_chr_alertness(100, chr) \
		label(0x20)

	label(0x20)
	if_alive_set_alerted(0x01)
	if_alive_set_alerted(0x02)
	if_alive_set_alerted(0x03)
	if_alive_set_alerted(0x04)
	if_alive_set_alerted(0x05)
	if_alive_set_alerted(0x06)
	if_alive_set_alerted(0x07)
	if_alive_set_alerted(0x08)
	if_alive_set_alerted(0x09)
	if_alive_set_alerted(0x0a)

	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1017_remove_special_shock[] = {
	beginloop(0x1f)
		if_stage_flag_eq(STAGEFLAG_DRCAROLL_ATTACKED, TRUE, /*goto*/ 0x00)
		if_stage_flag_eq(STAGEFLAG_FOYER_LIGHTS_RESTORED, TRUE, /*goto*/ 0x00)

		if_chr_death_animation_finished(0x01, /*goto*/ 0x20)
		if_chr_dead(0x01, /*goto*/ 0x20)
		if_chr_knockedout(0x01, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x02, /*goto*/ 0x20)
		if_chr_dead(0x02, /*goto*/ 0x20)
		if_chr_knockedout(0x02, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x03, /*goto*/ 0x20)
		if_chr_dead(0x03, /*goto*/ 0x20)
		if_chr_knockedout(0x03, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x04, /*goto*/ 0x20)
		if_chr_dead(0x04, /*goto*/ 0x20)
		if_chr_knockedout(0x04, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x05, /*goto*/ 0x20)
		if_chr_dead(0x05, /*goto*/ 0x20)
		if_chr_knockedout(0x05, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x06, /*goto*/ 0x20)
		if_chr_dead(0x06, /*goto*/ 0x20)
		if_chr_knockedout(0x06, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x07, /*goto*/ 0x20)
		if_chr_dead(0x07, /*goto*/ 0x20)
		if_chr_knockedout(0x07, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x08, /*goto*/ 0x20)
		if_chr_dead(0x08, /*goto*/ 0x20)
		if_chr_knockedout(0x08, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x09, /*goto*/ 0x20)
		if_chr_dead(0x09, /*goto*/ 0x20)
		if_chr_knockedout(0x09, /*goto*/ 0x20)
		reloop(0x1f)
		label(0x20)

		if_chr_death_animation_finished(0x0a, /*goto*/ 0x20)
		if_chr_dead(0x0a, /*goto*/ 0x20)
		if_chr_knockedout(0x0a, /*goto*/ 0x20)
	endloop(0x1f)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)

	label(0x00)
	remove_chr(CHR_SPECIAL_SHOCK)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1018_give_magnum[] = {
	beginloop(0x1f)
		if_chr_has_hiddenflag(CHR_BOND, CHRHFLAG_DETECTED, /*goto*/ 0x00)
	endloop(0x1f)

	// Player has been seen - remove Dy357 from shock trooper
	label(0x00)
	give_object_to_chr(OBJ_DY357, CHR_MRBLONDE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func1419_start_lifts[] = {
	activate_lift(2, 0x1d)
	activate_lift(1, 0x1e)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101a_set_rocketlauncher_flag[] = {
	yield
	if_difficulty_lt(DIFF_SA, /*goto*/ 0x20)

	// SA and PA
	set_object_flag2(OBJ_ROCKETLAUNCHER, OBJFLAG2_AICANNOTUSE)

	label(0x20)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101b_lift_door_sounds[] = {
	beginloop(0x8d)
		chr_toggle_p1p2(CHR_SELF)
		if_chr_activated_object(CHR_P1P2, 0x23, /*goto*/ 0x20)
		if_chr_activated_object(CHR_P1P2, 0x27, /*goto*/ 0x5e)
		if_chr_activated_object(CHR_P1P2, 0x20, /*goto*/ 0x20)
		if_chr_activated_object(CHR_P1P2, 0x24, /*goto*/ 0x25)
		if_chr_activated_object(CHR_P1P2, 0x21, /*goto*/ 0x5e)
		if_chr_activated_object(CHR_P1P2, 0x25, /*goto*/ 0x26)
		if_chr_activated_object(CHR_P1P2, 0x22, /*goto*/ 0x5e)
		if_chr_activated_object(CHR_P1P2, 0x26, /*goto*/ 0x5e)
		reloop(0x8d)

		label(0x25)
		if_door_locked(0x24, 0x01, /*goto*/ 0x5e)
		goto_next(0x20)

		label(0x26)
		if_door_locked(0x25, 0x01, /*goto*/ 0x5e)
		goto_next(0x20)

		label(0x20)
		play_sound(SFX_DOOR_81B0, -1)
		goto_next(0x00)

		label(0x5e)
		play_sound(SFX_MENU_SELECT, -1)
		label(0x00)
		restart_timer

		beginloop(0x21)
			if_timer_gt(120, /*goto*/ 0x00)
		endloop(0x21)

		label(0x00)
	endloop(0x8d)

	endlist
};

u8 func141c_setup_portals[] = {
	yield
	set_portal_flag(0x008e, PORTALFLAG_SKIP)
	set_portal_flag(0x008f, PORTALFLAG_SKIP)
	set_portal_flag(0x0084, PORTALFLAG_SKIP)
	set_portal_flag(0x0090, PORTALFLAG_SKIP)
	set_portal_flag(0x0091, PORTALFLAG_SKIP)
	set_portal_flag(0x0093, PORTALFLAG_SKIP)
	set_portal_flag(0x0096, PORTALFLAG_SKIP)
	set_portal_flag(0x0095, PORTALFLAG_SKIP)
	set_portal_flag(0x0099, PORTALFLAG_SKIP)
	set_portal_flag(0x00b6, PORTALFLAG_SKIP)
	set_portal_flag(0x00bf, PORTALFLAG_SKIP)
	set_portal_flag(0x00be, PORTALFLAG_SKIP)
	set_portal_flag(0x00c0, PORTALFLAG_SKIP)
	set_portal_flag(0x00c2, PORTALFLAG_SKIP)
	set_portal_flag(0x00c4, PORTALFLAG_SKIP)
	set_portal_flag(0x00c8, PORTALFLAG_SKIP)
	set_portal_flag(0x00c7, PORTALFLAG_SKIP)
	set_portal_flag(0x00c9, PORTALFLAG_SKIP)
	set_portal_flag(0x00cd, PORTALFLAG_SKIP)
	set_portal_flag(0x00ce, PORTALFLAG_SKIP)
	set_portal_flag(0x00d2, PORTALFLAG_SKIP)
	set_portal_flag(0x00e0, PORTALFLAG_SKIP)
	set_portal_flag(0x00dc, PORTALFLAG_SKIP)
	set_portal_flag(0x00de, PORTALFLAG_SKIP)
	set_portal_flag(0x00e3, PORTALFLAG_SKIP)
	set_portal_flag(0x00e5, PORTALFLAG_SKIP)
	set_portal_flag(0x00e7, PORTALFLAG_SKIP)
	set_portal_flag(0x00fb, PORTALFLAG_SKIP)
	set_portal_flag(0x00fa, PORTALFLAG_SKIP)
	set_portal_flag(0x00fc, PORTALFLAG_SKIP)
	set_portal_flag(0x00ff, PORTALFLAG_SKIP)
	set_portal_flag(0x0100, PORTALFLAG_SKIP)
	set_portal_flag(0x0103, PORTALFLAG_SKIP)
	set_portal_flag(0x0102, PORTALFLAG_SKIP)
	set_portal_flag(0x0104, PORTALFLAG_SKIP)
	set_portal_flag(0x0109, PORTALFLAG_SKIP)
	set_portal_flag(0x010c, PORTALFLAG_SKIP)
	set_portal_flag(0x0119, PORTALFLAG_SKIP)
	set_portal_flag(0x0112, PORTALFLAG_SKIP)
	set_portal_flag(0x0117, PORTALFLAG_SKIP)
	set_portal_flag(0x0120, PORTALFLAG_SKIP)
	set_portal_flag(0x011e, PORTALFLAG_SKIP)
	set_portal_flag(0x011c, PORTALFLAG_SKIP)
	set_portal_flag(0x0108, PORTALFLAG_SKIP)
	set_portal_flag(0x006f, PORTALFLAG_SKIP)
	set_portal_flag(0x007d, PORTALFLAG_SKIP)
	set_portal_flag(0x0080, PORTALFLAG_SKIP)
	set_portal_flag(0x0081, PORTALFLAG_SKIP)
	set_portal_flag(0x0075, PORTALFLAG_SKIP)
	set_portal_flag(0x0078, PORTALFLAG_SKIP)
	set_portal_flag(0x0079, PORTALFLAG_SKIP)
	set_portal_flag(0x0006, PORTALFLAG_SKIP)
	set_portal_flag(0x0004, PORTALFLAG_SKIP)
	set_portal_flag(0x0008, PORTALFLAG_SKIP)
	set_portal_flag(0x000a, PORTALFLAG_SKIP)
	set_portal_flag(0x0001, PORTALFLAG_SKIP)
	set_portal_flag(0x0005, PORTALFLAG_SKIP)
	set_portal_flag(0x0000, PORTALFLAG_SKIP)
	set_portal_flag(0x0003, PORTALFLAG_SKIP)
	set_portal_flag(0x0007, PORTALFLAG_SKIP)
	set_portal_flag(0x0013, PORTALFLAG_SKIP)
	set_portal_flag(0x0009, PORTALFLAG_SKIP)
	set_portal_flag(0x00b1, PORTALFLAG_SKIP)
	set_portal_flag(0x00ef, PORTALFLAG_SKIP)
	set_portal_flag(0x00ee, PORTALFLAG_SKIP)
	set_portal_flag(0x0121, PORTALFLAG_SKIP)
	set_portal_flag(0x00e8, PORTALFLAG_SKIP)
	set_portal_flag(0x00e9, PORTALFLAG_SKIP)
	set_portal_flag(0x00ea, PORTALFLAG_SKIP)
	set_portal_flag(0x00ec, PORTALFLAG_SKIP)
	set_portal_flag(0x00eb, PORTALFLAG_SKIP)
	set_portal_flag(0x00ed, PORTALFLAG_SKIP)
	set_portal_flag(0x009d, PORTALFLAG_SKIP)
	set_portal_flag(0x00af, PORTALFLAG_SKIP)
	set_portal_flag(0x00a1, PORTALFLAG_SKIP)
	set_portal_flag(0x005a, PORTALFLAG_SKIP)
	set_portal_flag(0x005c, PORTALFLAG_SKIP)
	set_portal_flag(0x005d, PORTALFLAG_SKIP)
	set_portal_flag(0x0060, PORTALFLAG_SKIP)
	set_portal_flag(0x0034, PORTALFLAG_SKIP)
	set_portal_flag(0x0030, PORTALFLAG_SKIP)
	set_portal_flag(0x002e, PORTALFLAG_SKIP)
	set_portal_flag(0x002b, PORTALFLAG_SKIP)
	set_portal_flag(0x0028, PORTALFLAG_SKIP)
	set_portal_flag(0x0025, PORTALFLAG_SKIP)
	set_portal_flag(0x0036, PORTALFLAG_SKIP)
	set_portal_flag(0x0038, PORTALFLAG_SKIP)
	set_portal_flag(0x004f, PORTALFLAG_SKIP)
	set_portal_flag(0x0051, PORTALFLAG_SKIP)
	set_portal_flag(0x0052, PORTALFLAG_SKIP)
	set_portal_flag(0x0057, PORTALFLAG_SKIP)
	set_portal_flag(0x0058, PORTALFLAG_SKIP)
	set_portal_flag(0x0031, PORTALFLAG_SKIP)
	set_portal_flag(0x002f, PORTALFLAG_SKIP)
	set_portal_flag(0x0023, PORTALFLAG_SKIP)
	set_portal_flag(0x00a6, PORTALFLAG_SKIP)
	set_portal_flag(0x00a3, PORTALFLAG_SKIP)
	set_portal_flag(0x00a2, PORTALFLAG_SKIP)
	set_portal_flag(0x00a4, PORTALFLAG_SKIP)
	set_portal_flag(0x0087, PORTALFLAG_SKIP)
	set_portal_flag(0x00b9, PORTALFLAG_SKIP)
	set_portal_flag(0x00b4, PORTALFLAG_SKIP)
	set_portal_flag(0x00b2, PORTALFLAG_SKIP)
	set_portal_flag(0x00b3, PORTALFLAG_SKIP)
	set_portal_flag(0x00bd, PORTALFLAG_SKIP)
	set_portal_flag(0x00f4, PORTALFLAG_SKIP)
	set_portal_flag(0x00f2, PORTALFLAG_SKIP)
	set_portal_flag(0x00f0, PORTALFLAG_SKIP)
	set_portal_flag(0x00f8, PORTALFLAG_SKIP)
	set_portal_flag(0x00f1, PORTALFLAG_SKIP)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func141e_setup_environment[] = {
	yield
	configure_environment(0x0000, AIENVCMD_00, FALSE)
	configure_environment(0x0000, AIENVCMD_01, FALSE)
	configure_environment(0x0000, AIENVCMD_02, TRUE)
	configure_environment(0x0000, AIENVCMD_03, FALSE)
	configure_environment(0x0000, AIENVCMD_04, FALSE)
	configure_environment(0x0002, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0002, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0003, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0003, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0004, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x0004, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0005, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0006, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0007, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0008, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0009, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000a, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000b, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000c, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000d, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000e, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x000f, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0010, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0011, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0012, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0013, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x0014, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x003a, AIENVCMD_ROOM_SETAMBIENT, TRUE)
	configure_environment(0x00a2, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00a4, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00a5, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	configure_environment(0x00a7, AIENVCMD_ROOM_SETOUTDOORS, TRUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

u8 func101d_setup_rtracker[] = {
	yield
	set_object_flag3(OBJ_GRENADE, OBJFLAG3_RTRACKED_BLUE)
	set_object_flag3(OBJ_DRAGON, OBJFLAG3_RTRACKED_BLUE)
	set_ailist(CHR_SELF, GAILIST_IDLE)
	endlist
};

struct ailist ailists[] = {
	{ func0401_drcaroll_following,            0x0401 },
	{ func0402_start_drcaroll,                0x0402 },
	{ func0403_stop_and_idle,                 0x0403 },
	{ func0404_init_drcaroll,                 0x0404 },
	{ func0409_tech_conversation,             0x0409 },
	{ func040a_tech2,                         0x040a },
	{ func040b_init_tech1,                    0x040b },
	{ func040c_init_tech2,                    0x040c },
	{ func040d_cass,                          0x040d },
	{ func040e_noop2,                         0x040e },
	{ func0405_drcaroll_waiting,              0x0405 },
	{ func0411_top_guard_blinded,             0x0411 },
	{ func0412_outro,                         0x0412 },
	{ func0414_init_shock,                    0x0414 },
	{ func0415_init_10hp,                     0x0415 },
	{ func1400_setup_counterop,               0x1400 },
	{ func1001_objectives_failed_msg,         0x1001 },
	{ func1002_check_accessed_foyer_elevator, 0x1002 },
	{ func1003_check_end_level,               0x1003 },
	{ func1004_elevator_unlocking,            0x1004 },
	{ func1005_check_bodyguards_dead,         0x1005 },
	{ func1006_check_hovercopter_destroyed,   0x1006 },
	{ func1007_noop,                          0x1007 },
	{ func1008_trigger_hovercopter_roof,      0x1008 },
	{ func1009_init_top_room,                 0x1009 },
	{ func100a_lightswitch,                   0x100a },
	{ func100b_check_top_lights_on,           0x100b },
	{ func100c_foyer_lights,                  0x100c },
	{ func100d_intro,                         0x100d },
	{ func100e_drcaroll_warnings,             0x100e },
	{ func100f_move_rocket_ammo,              0x100f },
	{ func100c_foyer_lights_timer,            0x1010 },
	{ func040d_cass_necklace,                 0x1011 },
	{ func1012_msg_lockeddown,                0x1012 },
	{ func1013_msg_thatcopter,                0x1013 },
	{ func1014_msg_cantleaveany,              0x1014 },
	{ func1015_msg_jumpshipwaiting,           0x1015 },
	{ func1016_msg_make_foyer_guards_alerted, 0x1016 },
	{ func1017_remove_special_shock,          0x1017 },
	{ func1018_give_magnum,                   0x1018 },
	{ func1419_start_lifts,                   0x1419 },
	{ func101a_set_rocketlauncher_flag,       0x101a },
	{ func101b_lift_door_sounds,              0x101b },
	{ func141c_setup_portals,                 0x141c },
	{ func101d_setup_rtracker,                0x101d },
	{ func141e_setup_environment,             0x141e },
	{ func101f_unlock_top_door,               0x101f },
	{ func040d_cass_outro,                    0x0407 },
	{ func0406_general_combat,                0x0406 },
	{ func040f_top_guard,                     0x040f },
	{ func0410_init_top_guard,                0x0410 },
	{ func0413_defend_pad,                    0x0413 },
	{ func0408_hovercopter,                   0x0408 },
	{ func100d_intro,                         0x0c00 },
	{ func0412_outro,                         0x0c01 },
	{ NULL, 0 },
};
